-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Eric Chevalier wrote:
| Grega Bremec wrote:
|
|> su -c /bin/bash --login
|
| I'm not sure this command is going to work. I think the "--login:
| option is going to force the system to try and load the shell defined
| in the passwd file *before* executing the command specified by "-c".
| su will fail because the passwd file entry for root is munged. It
| might be worth trying just "su" without any options; that might
| promote the ID to superuser without trying to load a new shell. If
| that works, Ryan should be able to edit and fix the passwd file.
|

Indeed, my bad. I forgot the quotes around su command, which passes the
- --login switch to "su" instead of "bash". I guess I just got into the
habit of using sudo a bit too much. :) Thanks for the reminder.

So, standing corrected, the proper command should read:

~    $ su -c "/bin/bash --login"

The difference is obvious:

~    [EMAIL PROTECTED]:/export/music> su -c "/bin/bash --login"
~    Password:
~    aspirinix:/export/music #

vs.

~    [EMAIL PROTECTED]:/export/music> su -c /bin/bash --login
~    Password:
~    aspirinix:~ #

(i.e. in the second case, "su" actually does the login bit, which makes
it honour the login shell specified in /etc/passwd)

I apologize for the mess-up, It's been a long day.  :)

Cheers,
- --
~    Grega Bremec
~    gregab at p0f dot net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFD8PN/fu4IwuB3+XoRA69EAJwPVH4eaUqFRSLp1ovshRRtjXmV3wCfWLNp
th2JoZYuRB62HpQKRB4qUac=
=GCBd
-----END PGP SIGNATURE-----

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to