Unable to useradd on 11.31


 
Thread Tools Search this Thread
Operating Systems HP-UX Unable to useradd on 11.31
# 1  
Old 07-28-2011
Unable to useradd on 11.31

Running into a bit of a problem on one of our HP-UX nodes.

I'm unable to add users through useradd.

We can edit the passwd file normally or through vipw, just fine. Once you remove the .pwd.lock file, though, vipw will not work.

Code:
root@fake_hp_hostname:/etc>uname -a
HP-UX fake_hp_hostname B.11.31 U ia64 4199993773 unlimited-user license
root@fake_hp_hostname:/etc>useradd -m -d /home/fake -g fake -u 8844 -c "fake" -s /usr/bin/ksh fake
/etc/passwd file does not exist
root@fake_hp_hostname:/etc>l /etc/passwd
-r--r--r--   1 root       other         7400 Jul 28 11:42 /etc/passwd
root@fake_hp_hostname:/etc>l /etc/.pwd.lock
-r--------   1 root       sys              0 Jul 28 11:43 /etc/.pwd.lock
root@fake_hp_hostname:/etc>rm /etc/.pwd.lock
root@fake_hp_hostname:/etc>useradd -m -d /home/fake -g fake -u 8844 -c "fake" -s /usr/bin/ksh fake
/etc/passwd file busy -- try again
root@fake_hp_hostname:/etc>touch /etc/.pwd.lock
root@fake_hp_hostname:/etc>chmod 400 /etc/.pwd.lock
root@fake_hp_hostname:/etc>useradd -m -d /home/fake -g fake -u 8844 -c "fake" -s /usr/bin/ksh fake
/etc/passwd file does not exist
root@fake_hp_hostname:/etc>

vipw not working after removing .pwd.lock:

Code:
root@fake_hp_hostname:/etc>rm /etc/.pwd.lock
root@fake_hp_hostname:/etc>vipwd
sh: vipwd:  not found.
root@fake_hp_hostname:/etc>vipw
lckpwdf: No such file or directory
vipw: Cannot obtain lock for /etc/.pwd.lock

Nothing seems to be attached to /etc/passwd or related files:

Code:
root@fake_hp_hostname:/etc>lsof /etc/.pwd.lock
root@fake_hp_hostname:/etc>lsof /etc/passwd
root@fake_hp_hostname:/etc>pgrep passwd
  UID    PID   PPID      STIME    TTY     TIME CMD
root@fake_hp_hostname:/etc>pgrep pw
  UID    PID   PPID      STIME    TTY     TIME CMD
root@fake_hp_hostname:/etc>lsof | grep -i passwd
root@fake_hp_hostname:/etc>

Anyone have any ideas? Other nodes are working just fine -- able to add, remove users, etc., other functions in sam.


edit: Found out the problem. pwgrd wasn't running.

Last edited by Nitrodist; 07-28-2011 at 02:52 PM..
This User Gave Thanks to Nitrodist For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Useradd with ansible

Hello, I need ansible playbook to create new user on remote server. Remote server blocked direct root login so I must login first application user and later I must run "useradd" command with sudo. I need playbook.yml and cli command. Best regards, (0 Replies)
Discussion started by: getrue
0 Replies

2. Solaris

useradd

I want to creat a 27 logins in solaris.Can anyone tell me how to write a script for that so that i create at a time for all 27 people. Thanks to guide me. (6 Replies)
Discussion started by: kkalyan
6 Replies

3. Solaris

useradd

if useradd command is deleted in solaris how do we add user (3 Replies)
Discussion started by: vivek_ng
3 Replies

4. Solaris

useradd problem

O/S: Solaris 9 Architecture: SPARC The man page for useradd states, "The new login remains locked until the passwd(1) command is executed." This is a problem for me when accessing remotely via SSH and creating a new account from the console with useradd. As soon as I try to login into the... (3 Replies)
Discussion started by: tuxsun1
3 Replies

5. UNIX for Dummies Questions & Answers

useradd command

what if useradd ? or useradd * is given as input???? if it wont execute. then what are the values for name shud be avoided like ? * (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

6. UNIX for Advanced & Expert Users

useradd?

Hi Experts, when using useradd command, what are the necessary options/arguments to be included? Please advice. (4 Replies)
Discussion started by: etcpasswd
4 Replies

7. Shell Programming and Scripting

useradd

Gurus, I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either. Regards (4 Replies)
Discussion started by: earlysame55
4 Replies

8. Solaris

useradd

Hi, I need to add a new user who will only be able to access one single folder on my Solaris 9 system. Can this be achieved by using just useradd or do i need to fiddle with auth_attr table? TIA, Selma (4 Replies)
Discussion started by: Selma
4 Replies

9. UNIX for Advanced & Expert Users

useradd

Hi. due to some needs i gave a user the premission to use useradd command with sudo. i want to know if there is a way to let him set the initial password, without giving him the premission to use passwd command as root (sudo). maybe a way to set a default password for all the new users that... (2 Replies)
Discussion started by: dorilevy
2 Replies

10. UNIX for Dummies Questions & Answers

useradd

I work on some hp ux 11.00 Servers. i have to add an user. i use the useradd command like follows: useradd -u 72022 -g 71095 -c " comment " -d /PACKAGE_NAME/home/username -s /usr/bin/sh username The command returns with error 3. The manpage means value number 3: Invalid argument supplied to an... (6 Replies)
Discussion started by: ortsvorsteher
6 Replies
Login or Register to Ask a Question