[Pkg-shadow-devel] useradd fails (cannot lock /etc/passwd)
9jd5b2
9jd5b2 at gmail.com
Thu Nov 12 11:29:12 UTC 2009
Hello,
I have a problem using useradd from shadow-4.1.4.2.
After having issued "useradd john" I get the following error message:
useradd: cannot lock /etc/passwd; try again later
"ls -l /etc/passwd" returns:
-rw-r--r-- 1 root root 32 Nov 10 19:06 /etc/passwd
"cat /etc/passwd" returns:
root:x:0:0:root:/root:/bin/bash
"strace -f useradd john 1>log 2>&1" returns:
execve("/usr/sbin/useradd", ["useradd", "john"], [/* 11 vars */]) = 0
brk(0) = 0x1fb8000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f97238b1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f97238b0000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/tls/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat("/lib64/tls/x86_64", 0x7fffdb57db30) = -1 ENOENT (No such file or
directory)
open("/lib64/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7fffdb57db30) = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat("/lib64/x86_64", 0x7fffdb57db30) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\352\1\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1665656, ...}) = 0
mmap(NULL, 3471336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f9723346000
mprotect(0x7f972348d000, 2093056, PROT_NONE) = 0
mmap(0x7f972368c000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x146000) = 0x7f972368c000
mmap(0x7f9723691000, 18408, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9723691000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f97238af000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f97238ae000
arch_prctl(ARCH_SET_FS, 0x7f97238ae6f0) = 0
mprotect(0x7f972368c000, 16384, PROT_READ) = 0
mprotect(0x7f97238b2000, 4096, PROT_READ) = 0
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
read(3, "65536\n", 31) = 6
close(3) = 0
mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7f972382d000
access("/etc/shadow", F_OK) = 0
access("/etc/gshadow", F_OK) = -1 ENOENT (No such file or directory)
brk(0) = 0x1fb8000
brk(0x1fd9000) = 0x1fd9000
open("/etc/default/useradd", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/login.defs", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=120, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f972382c000
read(3, "ENV_PATH PATH=/bin:/usr/bin:/usr"..., 4096) = 120
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f972382c000, 4096) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\23\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=38580, ...}) = 0
mmap(NULL, 2127144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f972313e000
mprotect(0x7f9723145000, 2093056, PROT_NONE) = 0
mmap(0x7f9723344000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f9723344000
close(3) = 0
open("/lib64/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200A\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=110463, ...}) = 0
mmap(NULL, 2194192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f9722f26000
mprotect(0x7f9722f3b000, 2093056, PROT_NONE) = 0
mmap(0x7f972313a000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f972313a000
mmap(0x7f972313c000, 6928, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f972313c000
close(3) = 0
mprotect(0x7f972313a000, 4096, PROT_READ) = 0
mprotect(0x7f9723344000, 4096, PROT_READ) = 0
open("/etc/nsswitch.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libnss_nis.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200!\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53280, ...}) = 0
mmap(NULL, 2139416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f9722d1b000
mprotect(0x7f9722d25000, 2093056, PROT_NONE) = 0
mmap(0x7f9722f24000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f9722f24000
close(3) = 0
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"...,
832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=58280, ...}) = 0
mmap(NULL, 2143688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x7f9722b0f000
mprotect(0x7f9722b1a000, 2093056, PROT_NONE) = 0
mmap(0x7f9722d19000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f9722d19000
close(3) = 0
mprotect(0x7f9722d19000, 4096, PROT_READ) = 0
mprotect(0x7f9722f24000, 4096, PROT_READ) = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
mmap(NULL, 32, PROT_READ, MAP_SHARED, 3, 0) = 0x7f972382c000
lseek(3, 32, SEEK_SET) = 32
fstat(3, {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
munmap(0x7f972382c000, 32) = 0
close(3) = 0
open("/etc/.pwd.lock", O_WRONLY|O_CREAT|O_CLOEXEC, 0600) = 3
rt_sigaction(SIGALRM, {0x7f9723414f60, ~[], SA_RESTORER,
0x7f9723377db0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [], 8) = 0
alarm(15) = 0
fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) =
-1 EACCES (Permission denied)
alarm(0) = 15
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x7f9723377db0}, NULL, 8) = 0
close(3) = 0
write(2, "useradd: cannot lock /etc/passwd"..., 51useradd: cannot lock
/etc/passwd; try again later.
) = 51
exit_group(1) = ?
Please notice I'm running a pretty experimental GNU/Linux system
similar to CLFS (cross-lfs.org). Many needed things may have not be
installed or configured correctly.
Thanks.
More information about the Pkg-shadow-devel
mailing list