Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Problems to add user dsl to lp group, Removed from all other groups?< Next Oldest | Next Newest >
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Sep. 12 2007,14:04 QUOTE

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?
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 12 2007,14:22 QUOTE

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 :)


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Sep. 12 2007,14:59 QUOTE

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
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 12 2007,16:55 QUOTE

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

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
3 replies since Sep. 12 2007,14:04 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Problems to add user dsl to lp group

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code