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.
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:
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:
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.