1832308 Members
2483 Online
110041 Solutions
New Discussion

unable to add new users

 
SOLVED
Go to solution
caj
Frequent Advisor

unable to add new users



Hi ,

We are unable to create new users in to one of our HP -Ux server .It is failing with following error .

# useradd u41893
/etc/passwd file does not exist

Any help will be appreciated .

Thanks in advance
ajeesh
15 REPLIES 15
Steven Richards
Frequent Advisor

Re: unable to add new users

Hi,

Worth trying ls -l /etc/passwd to check the password file does exist.

If not then try restoring it from a recent backup.

S.
A pint of vodka my good woman
dean licheri_1
New Member

Re: unable to add new users

sounds like you have lost /etc/passwd file. check and make sure it is there and that the correct permssions are set (644). if it is missing you may want to recover it from a backup.
Pete Randall
Outstanding Contributor

Re: unable to add new users

Have you checked for the existence of the /etc/passwd file? If it is not present - and this is not a trusted system - you will need to restore it from backup or from another server.


Pete

Pete
Rick Garland
Honored Contributor

Re: unable to add new users

The /etc/passwd file is gone, as stated.
You need to restore a copy from somewhere, being you have made backup copies on the system or from tape.

You can get a basic passwd file from /usr/newconfig/etc/passwd but this will not have the users in this file. It will allow you to reboot safely and login as root.

caj
Frequent Advisor

Re: unable to add new users

Hi all,

Yes the passwd file exist on /etc/passwd.And we tried to restore the old passwd file .after that also it is failing with same error.This is a trusted system and O.S version is 11.11

Thanks
ajeesh
Steven Richards
Frequent Advisor

Re: unable to add new users

Hi,

Does any of the info in this thread help?

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=728419

Might be worth a read.

S.
A pint of vodka my good woman
Rick Garland
Honored Contributor

Re: unable to add new users

What are the perms on the /etc/passwd file? This is a 444 file (owner, group, world read).

Do a 'cat -v' on the passwd file to see if there are any non-printing characters in the file. Maybe the file is corrupt?

caj
Frequent Advisor

Re: unable to add new users

yes the permission was 444 only then we tried with 644 also still it fails .also cat -v looks good
Robert-Jan Goossens_1
Honored Contributor

Re: unable to add new users

Hi Ajeesh,

or is this a bit of a cryptical message for "can not be locked" can you check if below file exists on your system?

# ls -la /etc/.pwd.lock
-r-------- 1 root sys 0 Sep 23 1999 /etc/.pwd.lock

if not, could please add your HPUX version?

Regards,
Robert-Jan
caj
Frequent Advisor

Re: unable to add new users

The file exist on the server with proper permission .the OS version is 11.11
Sivakumar TS
Honored Contributor

Re: unable to add new users

Hi,

The owner should be root

and the group should be sys

with -r--r--r-- permission.

Regards,

Siva.
Nothing is Impossible !
Robert-Jan Goossens_1
Honored Contributor

Re: unable to add new users

could you check if PHCO_33142 is installed.

By the way, is this a trusted system?
caj
Frequent Advisor

Re: unable to add new users

Hi robert ,

The patch was not installed and this is a trusted system
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: unable to add new users

Hi Ajeesh,

I think there could be 3 possible solutions.

-1- trusted system password database problem
try
# authck -pv
# pwconv

-2- your useradd conf file is corrupted.
# mv /etc/default/useradd /etc/default/old.useradd
# cp /usr/newconfig/etc/default/useradd /etc/default/useradd

-3-
Although your problem is not described in patch PHCO_33142, there is fix for various useradd problems.
---
( SR:8606430859 CR:JAGaf90305 )
Under certain scenarios, useradd/usermod/userdel are not working as expected.
---

Hope this helps,
Robert-Jan
caj
Frequent Advisor

Re: unable to add new users



the command authck -p worked .now we are able to add new users in the server .

Thanks all


Ajeesh