Skip to main content
3 of 5
deleted 389 characters in body
Mark Plotnick
  • 26k
  • 3
  • 68
  • 82

OP and I worked through this; see chat for details. First, OP changed

/sbin/sulogin

in /etc/init/mountall-shell.conf to

/usr/bin/ltrace -S -f -o /root/sulogin-ltrace.log /bin/sulogin

The log indicates that the segfault occurs in the following code, where crypt is returning NULL.

if ((p = getpasswd(pwd->pw_passwd)) == NULL) break;
if (pwd->pw_passwd[0] == 0 ||
    strcmp(crypt(p, pwd->pw_passwd), pwd->pw_passwd) == 0)
        sushell(pwd);

Next question is, what's causing crypt to return NULL?

OP said that the shadow entry for root is root:x:16273:0:99999:7:::.

sulogin has its own interpretation of special encrypted passwords. If it sees "*" or "!", it lets the user in with no password. Anything else, it does some validity checking, but "x" sails right through, yet crypt doesn't like it and returns NULL.

OP is going to file a bug report for sysvinit-utils; sulogin ought to handle a NULL return from crypt more gracefully.

Mark Plotnick
  • 26k
  • 3
  • 68
  • 82