Problems to add user dsl to lp group
Forum: Printers
Topic: Problems to add user dsl to lp group
started by: Juanito
Posted by Juanito on Sep. 12 2007,14:04
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?
Posted by curaga on Sep. 12 2007,14:22
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
Posted by Juanito on Sep. 12 2007,14:59
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 |
Posted by curaga on Sep. 12 2007,16:55
Must be a busybox/older ver... Then you'll just have to add by hand (edit /etc/group) to avoid listing all the groups..
|