Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-08-2003, 05:34 PM   #1
Registered: Feb 2002
Distribution: Fedora Core 2
Posts: 586

Rep: Reputation: 30
Add a user thorugh SHELL?

I'm trying to add user joe to Linux.. Got an error message:

[mike@localhost sbin]$ ./adduser joe
adduser: unable to lock password file

Can someone give step by step instructions how to add user in Linux through SHELL(I know how to add user through KDE or GNOME)


Old 01-08-2003, 05:45 PM   #2
Registered: Jan 2002
Location: Elkton, MD
Distribution: Debian 3.1, SimplyMEPIS 3.3.1, Kanotix 2005-03
Posts: 91

Rep: Reputation: 15
Are you logged in as root when you do this? I usually do it like:
$ adduser

But I guess either way would work as long as your root.
Old 01-08-2003, 05:59 PM   #3
LQ Newbie
Registered: Jan 2003
Location: USA
Posts: 18

Rep: Reputation: 0
You can vi the passwd file (/etc/passwd). Change user name, numeric id and home dir. You'll also have to manually create the home dir for the user.
Old 01-08-2003, 10:18 PM   #4
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
You'd only need ./ in front of a command if you're in the directory where it resides and that directory is not already in your PATH variable.

Anyway, perhaps adduser produces a lock file that is still there after the command completed (error, not the way it should happen). So see if you can find it and manually delete it. I'd start by looking in /var/lock for a filename with adduser or similar in the filename.
Old 01-08-2003, 11:31 PM   #5
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30

Darkstar wins the prize.. Ding!

The clue was right here :

[mike@localhost sbin]$ ./adduser joe

Mike isn't root. You need to run the adduser as root.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 02:14 PM
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 02:08 AM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 10:59 AM
Add user to Webmin through SHELL? mikeshn Linux - General 1 12-05-2003 03:00 PM
Add User Shell Script DAC Programming 2 10-13-2002 04:12 PM

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration