problem with user creation

hamed

Verified User
Joined
Jul 21, 2004
Messages
17
Location
Iran (Tehran)
Hello,
when I want to create a user, I get this error:

Code:
Error Creating User sadrafag
 
 
 
Details


Error creating user: useradd: unable to lock password file 
Cannot find a home directory after the system user creation for sadrafag
The home directory for sadrafag was not created.

at first, this problem happend to one of my server which was with layeredtech and I contacted their support to solve it and it's not solved yet and today, I got this problem on my another server which was working since 6 months ago.
the server with layeredtech is FREEBSD and the other server is REDHAT9.0
I've not done anything on the server which would damage the server.
may someone tell me what's this problem and how can I solve it?

Thanks
 
I've never had this problem and you've had it twice, on two different servers, two different operating systems.

It's possible that you've just had the same bad luck twice.

It's also possible you've done something that's causing a problem.

Without logging in, I don't see how anyone is going to be able to tell.

If you're renting a dedicated server your server hosting company should have a tech support department. If you've rented your DA license, you should have tech support from DA.

Jeff
 
1 reason i could think of...

the lines count in /etc/passwd is larger than the stock max UID in /etc/login.defs, so you get "unable to lock password file"
if so try raising the UID_MAX and GID_MAX value in /etc/login.defs
 
Last edited:
this is the info of the user added by DA:

kapsalonhm:x:523:524::/home/kapsalonhm:/bin/false


info from /etc/login.defs:

UID_MIN 500
UID_MAX 60000

#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000

the user is created and the homedir is made.

but still it returns the error:

Cannot find a home directory after the system user creation for kapsalonhm
 
freakie said:
this is the info of the user added by DA:

kapsalonhm:x:523:524::/home/kapsalonhm:/bin/false


info from /etc/login.defs:

UID_MIN 500
UID_MAX 60000

#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000

the user is created and the homedir is made.

but still it returns the error:

Cannot find a home directory after the system user creation for kapsalonhm

PM me :)
 
We fixed it. Maybe related or not to the convert to dovecot in Da we did yesterday. The files were locked, so these files appeared in /etc:

- group.lock
- gshadow.lock
- passwd.lock
- shadow.lock

So we deleted those files and problem fixed, now we can create users.
 
i still have the same...even after fixing some differences between uid and gid

the only difference i can see between existing user and hte new user added is that the homedirectory has different permissions

drwx------ 2 testgebruiker testgebruiker 4096 Sep 27 09:56 testgebruiker
drwx--x--x 6 tirza tirza 4096 Apr 12 12:26 tirza

the testgebruikers is the new made one using DA.

the user and the directory itself are made. but they have different permissions.

could that be the problem?
 
Back
Top