You are not logged in.
i am trying to execute "useradd" on rc.sysinit to allow dynamic user creation on startup for the Archie Live project and im getting "unable to lock password file". trying to execute the same command after login works fine. i checked for no /etc/passwd.lck nor /var/lock/passwd. im guessing its because the init process hasnt finished yet, but i might be wrong. any ideas how to fix/overcome this?
tnx in advance
Offline
Run it with strace to see what file it tries to use (`strace -o logfile useradd`).
Offline
check and see if its before the root filesystem is remounted rewrite.
so you'd need to do it after mounting local filesystems (or at least in my hackish rc.sysinit)
Offline
well, the problem was /etc/.pwd.lock, im guessing since it was used by the init process. im deleting it before the useradd, and all works well.
tnx i3839 for the tip (as always...)
Offline
z4ziggy said that deleting /etc/.pwd.lock before running useradd solved the problem, so rm -f /etc/.pwd.lock before the command
[My Blog] | [My Repo] | [My AUR Packages]
Offline
oh well, make sure it is mounted rw then, try mount -o remount,rw / before removing the file
[My Blog] | [My Repo] | [My AUR Packages]
Offline