From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079040315968.tru64-unix-managers.marc@archive.invalid> From: Charles Vachon Date: Tue, 27 Apr 1999 14:48:42 +0000 To: tru64-unix-managers Subject: SUMMARY: is changing root account shell a good idea? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079040315968 Hello again admins, In my partial summary posted last week, I asked responders to resend thei= r message to my mailbox if these were not included in the summary. I receiv= ed several new responses, confirming that mail sent to me was really lost at= some point last week. So, thanks to the following people, for either resending their responses,= or preparing new ones in light of comments published in the partial summary:= Hank Lee Davis Larry Griffith Lawrence Decker Jerome M Berkman Ian Mortimer The original question was: > Hello managers, > > What are the pro's and con's of changing the shell for the root account= > in /etc/passwd? The default /bin/sh is rather limited for interactive > usage, and typing "ksh -o emacs" in every starting session is annoying.= > The compelling choice is: change the root's shell to /bin/ksh, but is i= t > a good idea? > > I will post a summary of your thoughts, opinions, comments, etc... > > Thank you! Again, opinions vary, to the point that some are in contradiction. By respect to their contents, I reproduced them all integrally below. Respon= ses contained in the partial summary are not reproduced here. I invite you to= consult "partial SUMMARY: is changing root account shell a good idea?" for the first batch= of responses received on this subject". #################### Hank Lee: Charles, I've been told, and I've always believed, that root should have a shell that was statically linked. Statically linked shells do not require dynamic runtime libraries, and therefore not dependent on them. If, for some reason, some of your dynamic runtime libraries got corrupted, your system may crash and your dynamically linked shell might not run. Another= possibility is that if a clever hacker gets onto your system, and sees that root uses a dynamically linked shell. He may replace one or more of those dynamic runtime libraries with ones that compromises your system security even more. This used to be a problem when I worked at an educational institution, running Sun Solaris. As far as I know, root's default shell, /sbin/sh, is not dynamically linked: % file /sbin/sh sh: COFF format alpha demand paged executable or object module stripped - version 3.11-10 ksh, however, is: % file /bin/ksh ksh: COFF format alpha dynamically linked, demand paged executable or object module stripped - version 3.11-10 -- Hank Lee UNIX Systems Administrator SAP Basis Administrator Santa Clara County Transit District #################### Davis: Charles, Changing root's shell has no affect on boottime procedures. If you look= at the /sbin/rc2 and rc3 scripts they do explicit shell checks before execut= ing the startup scripts. The shell used in single user mode is /sbin/sh (not /bin/sh as noted in one reply). In fact, /bin is simply a link to /usr/bin and many binaries in /usr/ucb = are hard links to /usr/bin files. It is /not/ a good idea to create one big / partition that contains both = / and /usr as was described in one reply. This is not supported and will br= eak installupdate and dupatch installation. Note that even in single user mode, many binaries in /sbin are no longer linked static. They use the shared libraries in /shlib. Alan Davis Tru64 Unix Consultant #################### Larry Griffith: Dear Charles, Sorry to hear about all your mail troubles. I have used ksh as a= root shell for years without problems. I would echo the sentiments in your partial summary about making sure your shell is available in /. Granted that su works for most tasks, still some things must be done directly as root (like changing the root password). vipw works fine with ksh. Larry #################### Lawrence Decker: I changed all three of my DEC servers to bash as my root shell account. First check to see if the shell you want is in the /etc/shell file. After that dxaccount, and change the shell. Lawrence Decker Palm Beach County Health Care District Where ever you go...There you are #################### Jerome Berkman: I think /bin is always a symbolic link for /usr/bin on Digital UNIX (but not necessarily elsewhere). Maybe the point is to make sure the shell is in / as sh is in /sbin/sh, but csh and ksh are not in / But we do use: root:*:0:1:UCLINK4 Root,,,:/:/bin/csh and have not gotten into any trouble so far... - Jerry Berkman, UC Berkeley #################### Ian Mortimer: Hi Charles We've been using bash or ksh as our root shell here for years without any problems. > Make certain that whatever shell you use is in /bin, not /usr/bin. > Don't use a link. That way if you have to boot into single user, > you still have a shell. This is false. You always get /sbin/sh in single user no matter what shell is specified in /etc/passwd. You have to do 'exec ksh' (or whatever) in single user to get your preferred shell. Ian #################### Many thanks to all who took time to share ideas on this matter. -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Charles Vachon tel: (418) 627-6355 x2760 email: cvachon2@mrn.gouv.qc.ca Administrateur de syst=E8me FRCQ/Minist=E8re des Ressources Naturelles du Qu=E9bec =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D