Control: tags -1 moreinfo On 29/01/15 09:06, Peng, Nancy (NSN - CN/Beijing) wrote: > If the /etc/passwd (or shadow) entry for the user is empty, I invoke > `sulogin' without arguments from an ordinary shell > prompt, it prints `System Maintenance Mode', rather than to ask user for > a password “Give root password for system maintenance > (or type Control-D for normal startup)” > > Here is a transcript: > > $ sulogin > System Maintenance Mode > $ /sbin/hello > System Maintenance Mode > $ > > > I suggest that sulogin always ask user for a password even if > /etc/passwd (or shadow) entry for the user is empty.
Hi Nancy, Do you mean that when the 'root' user has no password (in the password or shadow databases) that busybox's sulogin simply goes straight into maintenance mode rather than giving the user the choice of whether to do or? sulogin is only enabled in busybox-static. In busybox 1.27.2, the behaviour is as described above but the message is clearer than in your initial report: root@localhost:/# busybox sulogin sulogin: starting shell for system maintenance root@localhost:/# Note that busybox's sulogin doesn't work when run as non-root; util-linux's sulogin simply refuses to run ("only superuser can run this program") while busybox's goes through the motions of asking for a password but this never succeeds. I suspect that two changes are needed in busybox sulogin: 1. Refuse to run as non-root as util-linux's implementation does. It only makes sense to run sulogin as root, during boot, to allow the user to perform maintenance if required. 2. When root has no password, give the user the choice of whether to perform maintenance or not. Whether this is done by asking for a password anyway or by some other means is up for debate. Is this what you meant? If so I will bring it up for discussion on the busybox-users mailing list. Best regards, Chris -- Chris Boot bo...@debian.org
signature.asc
Description: OpenPGP digital signature