Re: Root users shell == no existant shell /bin/bash

From: Jean-Pierre FORCIOLI (jean-pierre.forcioli_at_cyber-networks.fr)
Date: 07/09/04

  • Next message: Peter C. Lai: "Re: Root users shell == no existant shell /bin/bash"
    To: freebsd-security@freebsd.org
    Date: Fri, 09 Jul 2004 07:46:57 +0200
    
    
    

    On Thu, 2004-07-08 at 23:23, Taras Y. NIZHNIK wrote:
    > On Thu, 8 Jul 2004, Brandon Grace wrote:
    > > I made a mistake setting my shell and have set the root users shell to
    > > /bin/bash instead of /bin/sh. I am curiuos if anyone knows how to fix this.
    > > The machines is FreeBSD 4.8-RELEASE-p4 and does not have sudo only su.
    > How about 'su -m' ?

    "su -m" will be a solution only if "/bin/bash" is a valid shell and the
    caller is root :

      "The invoked shell is your login shell, and no directory changes are
       made. As a security precaution, if the target user's shell is a
       non-standard shell (as defined by getusershell(3)) and the caller's
       real uid is non-zero, su will fail."

    But apparently, Brandon can't login anymore with "root" account because
    "/bin/bash" doesn't exist (so isn't a valid shell...).

    -- 
    Jean-Pierre FORCIOLI		OpenPGP: 1024D/CF173713
    Cyber Networks			http://www.cyber-networks.fr/
    Tl : +33 (0)1 42 04 95 89	Fax : +33 (0)1 42 04 95 87
    
    



  • Next message: Peter C. Lai: "Re: Root users shell == no existant shell /bin/bash"

    Relevant Pages

    • Re: hi all..
      ... and someone gets access your shell account, ... Only root can install an su binary. ... Of course, if I have sudo ...
      (Fedora)
    • Re: Kmail offline
      ... GUI sessions as root? ... I will not help you with problems running GUI as root. ... That was a straight copy paste from the shell it ran from. ... checking I could get it to do said the install was all right. ...
      (Fedora)
    • Re: csh as default root Shell
      ... Another source is the the FreeBSD Handbook that is available ... As for changing the root shell, it is probably not a good idea. ... Put the new root account you created farther down in the passwd file ...
      (freebsd-questions)
    • Re: "No Shell"
      ... There is simply no need to login as root - ever, ... > you don't have to guard(and spread) root's password anymore. ... And change the shell or whatever it s/he just well damn ... Other than that nothing else should depend on root shell, ...
      (comp.unix.admin)
    • Re: Newbie Questions Regarding <SU> Command & Running Periodic Updating
      ... the log in level and root level. ... The first time you suyou become root, but your shell ... the shell environment is left the same except ... sucommand is aliased to add in some other options, ...
      (freebsd-questions)