Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sysinst default root login shell



On Mon, 09 Apr 2012, Andreas Gustafsson wrote:
If anita relies on having a specific shell for root user, why not just
invoke /bin/sh explicitly, rather than relying on sysinst behavior?
The current sysinst behavior is a bug, and I would like the bug to be
fixed rather than changing the test to ignore it.

I agree that there's a problem in sysinst, but I don't agree about what the problem is.

The underlying system default is that root's shell is /bin/csh, as encoded in src/etc/master.passwd.

Until recently, sysinst encouraged you to change the shell to /bin/sh (if you just accepted the default answers in relevant menus). I think that it was a bad idea, or a bug, to have sysinst encourage something other than the underlying default.

Currently, sysinst doesn't present the "Root shell" menu by default, so if you don't deliberately go into the Root shell menu, then you get /bin/csh, the underlying system default. However, if you do go into that menu, then sysinst encourages you to change to /bin/sh (if you accept the default answer in the menu).

I think that the default answer in the "Root shell" menu should be taken from whatever is in /etc/master.passwd at the time the menu appears, instead of always being /bin/sh. For example, instead of

Root shell >a: /bin/sh b: /bin/ksh
     c: /bin/csh

(with the cursor on "a: /bin/sh"), use getpwname or equivalent to look in master.passwd and adjust the cursor position accordingly, displaying this if root's shell is csh:

Root shell a: /bin/sh b: /bin/ksh
    >c: /bin/csh

(with the cursor on "c: /bin/csh").

Then I think "anita install" should deliberately go into that menu and choose /bin/sh, or "anita test" should be adapted to work under any shell (possibly by launching /bin/sh immediately after login).

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index