Stupid mistake - changed root shell to /bin/false
Wasn't paying attention to which terminal I was typing in, and instead of changing the shell of a test account, I changed root's shell to /bin/false.
Now I can't log into root, can't su into root, can't do anything with the root account. That's bad. What's worse is that I'm not located anywhere near the computer. I can probably fix this issue with Knoppix when I get home, but that will be some time from now. Is there a way I can fix this remotely? Thanks in advance for any help anybody can provide, and excuse my idiocy. :) |
Not that I can think of ;) Some type of LiveCD locally will be your best bet.
|
hi there,
do you have Code:
/etc/sudoers you could mess with 'sudo'. you can execute commands with 'root' right without shell invoking. i don't see any other chance, considering that you are with remote access. regards slackie1000 |
I didn't have sudo installed, no, but I downloaded the package. I'll install it once I get root access back.
Looks like my only plan is to wait until I can get back to the machine, boot up on my recovery CD, mount the harddrive, and edit from there. Ah well. |
No need ... use su with the -s option. That lets you specify which shell to use, overriding the entry in /etc/passwd.
|
Quote:
http://www.rt.com/man/su.1.html Quote:
|
Quote:
AFAIK, the '-s' option does not work if you are trying with a non-root user. cheers, slackie1000 |
I looked at that man page link, did you try the "command" option?
Code:
su --command=passwd |
Quote:
Code:
su -c passwd |
All times are GMT -5. The time now is 08:53 AM. |