Click to See Complete Forum and Search --> : changing a users group name?
Huggy
09-14-2001, 11:10 AM
when I made a user I *ucked up I had made a user named darrell and in a group called darrell I need to change that to group users
I know its the (I think)
chown [option] owner group
but it don't work what I'm not doing?
please give some insite I'm trying to really learn this stuff. :eek:
element-x
09-14-2001, 11:15 AM
/usr/sbin/usermod -g users darrell
for more information run
/usr/sbin/usermod -h
or
man usermod
Craig McPherson
09-14-2001, 11:17 AM
To change a user's primary group, edit /etc/passwd and change the user's entry. The second number is for group ID. Cross-reference with /etc/group to get a list of group IDs.
You can add users to multiple groups. Edit /etc/group to do so.
To change both user and group ownerships on a file:
chown username.groupname filename
OR
chown userid.groupid filename
To change just the group ownership of a file, use the chgrp command.
Huggy
09-16-2001, 03:21 PM
this is what I have in /etc/psswd
darrell:x:500:100:darrell lastname: bla bla
larry:x:501:100:bla bla bla
guest:x:502:100::bla bla bla bl
and this for /etc/group
users:x:100
darrell:x:500
So what numbers am I changing?
you said the 2nd was the group ID and to look up what it was in the etc/group/ well the only same number there is 100 :confused:
Craig McPherson
09-16-2001, 03:47 PM
If the second numbers for all the users is 100, then they're all in the Users group. Is there something that makes you think otherwise?