Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I make ksh or csh be the login shell for root?

csh ksh LOGIN Shell
0

Root’s shell is /sbin/sh, which is statically linked. Don’t just insert a ‘c’ before “sh” as previously, as that would look for /sbin/csh, which doesn’t exist. Don’t just change it to /bin/csh, since that’s really /usr/bin/csh, which is dynamically linked, because: 1) /usr may not be mounted initially, and then you’re in deep (the shared libraries are in /usr!), and 2) There is code in the startup scripts that assumes that everything critical is in /etc/lib, not /usr/lib. Approach with caution! Whenever you change root’s shell, make sure you do it using vipw or “passwd -e”. Both programs will check for a valid (in the sense of /etc/shells) file. Safer bet – have an alternate root account, like “rootcsh”, with uid 0, and /bin/csh as its shell. Put it after root’s entry in the passwd file. Only drawback: you now have to remember to change all of root’s passwords at the same time. Third bet – in root’s .profile, check if /usr is mounted and, if so, exec /bin/ksh or whatever. An even bette

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123