OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: [suse-security] root has no shell

From: Lars Ellenberg (l.g.eweb.de)
Date: Wed Oct 08 2003 - 09:12:57 CDT


/ 2003-10-08 15:47:50 +0200
\ Ulrich Kautz:
> Hello All,
>
> Ive got a big Problem. I changed the root shell to /bin/false.
>
> There is neither a user in the sudoers nor is there any other root-user or
> even a user in the root group.
>
> Is it possible to switch back the shell to /bin/bash or sh or something?
>
> Ive tried:
> sudo -- not in sudoers
> su -s /bin/bash -c "command" -- "using restricted shell: /bin/false"
>
> thanks in advance,
> Ulrich

sorry, can not confirm this.

if nothing helps, there is always the "rescue" system on you
installation cds ...
or, if your boot loader permits this:
boot with init=/bin/bash :-)

SuSE 8.1, kernel.org 2.4.22, no special pam settings.

larsjohann$ grep root /etc/passwd
root:x:0:0:root:/root:/bin/false
(0) 16:08:32 ~
larsjohann$ su
Password:

-- /bin/false drops me back to my "lars" prompt

(0) 16:08:42 ~
larsjohann$ su -s /bin/bash
Password:
(0) 16:08:51 /home/lars
rootjohann#

-- ok, now I'm root again, hack away ...

        Lars Ellenberg

--
Check the headers for your unsubscription address
For additional commands, e-mail: suse-security-helpsuse.com
Security-related bug reports go to securitysuse.de, not here