You are not logged in.

#1 2012-04-05 08:04:15

mrLogan
Member
Registered: 2012-03-08
Posts: 23

[SOLVED] Problems changing primary group for user

Hello,
I used the following command to add a new user

# sudo useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power,scanner -s /bin/bash mel

I think did

#cat /etc/group

and everything looked like it should apart from the user mel was not on the users group line

e.g.

storage:x:95:john,mel
scanner:x:96:john,mel
power:x:98:john,mel
nobody:x:99:
users:x:100:john

so I tried
# sudo usermod -g users mel

still no effect

is this normal?

Last edited by mrLogan (2012-04-05 08:36:32)

Offline

#2 2012-04-05 08:09:48

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [SOLVED] Problems changing primary group for user

Try using "adduser" (interactive version) instead and see if the behaviour remains the same.


Burninate!

Offline

#3 2012-04-05 08:29:16

mrLogan
Member
Registered: 2012-03-08
Posts: 23

Re: [SOLVED] Problems changing primary group for user

Gcool wrote:

Try using "adduser" (interactive version) instead and see if the behaviour remains the same.

I used

#sudo userdel -r mel

to remove the account

and then used

#sudo adduser

and went through the prompts

by default it wanted to add the users group as primary and I accepted it

everything went fine , no errors but yet again the

cat /etc/group shows

storage:x:95:john,mel
scanner:x:96:john,mel
power:x:98:john,mel
nobody:x:99:
users:x:100:john
dbus:x:81:

interestingly if I do

#sudo id mel

I get

uid=1001(mel) gid=100(users) groups=100(users),7(lp),10(wheel),50(games),91(video),92(audio),93(optical),95(storage),96(scanner),98(power)

I am officially freaked !

Offline

#4 2012-04-05 08:36:02

mrLogan
Member
Registered: 2012-03-08
Posts: 23

Re: [SOLVED] Problems changing primary group for user

found this

http://nixcraft.com/hp-ux/12216-user-na … -file.html

apparently some time ago they made a decision to not include primary groups in /etc/group to keep the number of lines down

Offline

Board footer

Powered by FluxBB