On Mon, Aug 11, 2014 at 9:14 PM, Nilesh Govindrajan <m...@nileshgr.com> wrote:
> I have pam_pgsql and libnss-pgsql installed. On one server su works
> perfectly, but on the other one when I try to su (both, with and
> without -l) it hangs.
>
> Both are using systemd and the same kernel (they are same config
> except # of HDDs).
>
> Here's the strace -
>
> fstat(4, {st_mode=S_IFREG|0644, st_size=10523, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0x2afda592000
> read(4, "#\n# /etc/login.defs - Configurat"..., 4096) = 4096
> read(4, "ogin configuration initializatio"..., 4096) = 4096
> read(4, "\n#ENCRYPT_METHOD DES\n\n#\n# Only w"..., 4096) = 2331
> read(4, "", 4096)                       = 0
> close(4)                                = 0
> munmap(0x2afda592000, 4096)             = 0
> access("/var/run/utmpx", F_OK)          = -1 ENOENT (No such file or 
> directory)
> open("/var/run/utmp", O_RDONLY|O_CLOEXEC) = 4
> lseek(4, 0, SEEK_SET)                   = 0
> alarm(0)                                = 0
> rt_sigaction(SIGALRM, {0x2afd9cdf070, [], SA_RESTORER, 0x2afd9bf5850},
> {SIG_DFL, [], SA_RESTORER, 0x2afd9bf5850}, 8) = 0
> alarm(10)                               = 0
> fcntl(4, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
> read(4, "\2\0\0\0\0\0\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 384) = 384
> read(4, "\6\0\0\0P\n\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 384) = 384
> read(4, "\10\0\0\0%\23\0\0pts/0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 384) = 384
> read(4, "\10\0\0\0E\23\0\0pts/1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 384) = 384
> read(4, "\7\0\0\0I\"\0\0pts/2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 384) = 384
> fcntl(4, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
> alarm(0)                                = 10
> rt_sigaction(SIGALRM, {SIG_DFL, [], SA_RESTORER, 0x2afd9bf5850}, NULL, 8) = 0
> close(4)                                = 0
> getuid()                                = 0
> sendto(3, "<86>Aug 11 17:42:30 su[8791]: pa"..., 96, MSG_NOSIGNAL, NULL, 0) = 
> 96
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x2afda58f9d0) = 8793
> rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], NULL, 8) = 0
> rt_sigaction(SIGTERM, {0x403830, [], SA_RESTORER, 0x2afd9bf5850}, NULL, 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [ALRM TERM], NULL, 8) = 0
> wait4(-1,
>
> Any ideas what is it waiting on?

Looks like it was because of nscd being disabled. I forgot to enable
it after transitioning to systemd.

Reply via email to