Printers :: Problems to add user dsl to lp group



I added "usermod -G lp dsl" to bootlocal.sh in an attempt to add the user dsl to the group lp (which may or may not be required for some aspects of hplip printing).

I just noticed that I get the following in /var/log/messages:
Quote
Sep 12 16:54:47 box authpriv.info usermod[1223]: add `dsl' to group `lp'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `dialout'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `fax'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `voice'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `cdrom'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `floppy'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `tape'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `sudo'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `audio'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `dip'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `video'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `games'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `users'
Sep 12 16:54:47 box authpriv.info usermod[1223]: delete `dsl' from group `usb'
Sep 12 16:54:47 box authpriv.info usermod[1223]: add `dsl' to shadow group `lp'


I guess I should reformat the usermod command, but how?

From the man page, -G option: if user is a member of any other groups than listed, he'll be removed from them. To prevent this and only add the user to a new group, see the -a option.

So add -a to that command and everything is okay :)

Thanks, but:
Code Sample
$ sudo usermod -a -G lp dsl
usermod: invalid option -- a
usage: usermod  [-u uid [-o]] [-g group] [-G group,...]
               [-d home [-m]] [-s shell] [-c comment] [-l new_name]
               [-f inactive] [-e expire ] [-p passwd] [-L|-U] name

Must be a busybox/older ver... Then you'll just have to add by hand (edit /etc/group) to avoid listing all the groups..

original here.