Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how add user in Redhat6.2

Status
Not open for further replies.

mingx98

Technical User
Mar 16, 2000
78
0
0
CA
hi, Dear all,
When I try "#useradd new_user " in Redhat 6.2,
it say:
useradd: error locking group file

what is matter , how can I add a user to the Redhat 6.2 ?

Thanks

 
Hi,





Well useradd (or adduser which is symbolically linked to useradd) is the right command from the shell. Sounds like there is an error trying to update the /etc/groups file - by default a redhat system will create a new group which equates to the user name. Perhaps the permissions are wrong - a 'ls -l /etc/group' should look like this :





-rw-r--r-- 1 root root 650 Jul 25 21:20 /etc/group





If its different then do (as root)





chmod 644 /etc/group





Another tactic would be to specify an existing group to see if that works (it wouldn't need to lock /etc/group for writing). For example -





/usr/sbin/useradd new_user -g users -n





-n suppresses the redhat specfic feature of creating a group equivalent to username.





Otherwise you could try using 'linuxconf' (with or without X) or even going to single user mode with 'init 1', mounting the /usr filesystem manually if necessary, then doing the '/usr/sbin/useradd....' again.





Hope this helps, Iain


 
friend,
You can also try userconf.Just invoke that in the command line give the login name , name of the person and the group and also the UID number that's it a user is added.Give the password of your choice.

Krischrist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top