maxxfi wrote:Instead of mangling with /etc/passwd file, add as last line of root's .profile something like:
That will launch bash (closing default ash) when you login in, but only if it finds it.
So after an update (or more generally if /opt gets broken) you can still login as root.
if [ -x /opt/bin/bash ]; then
judge146 wrote:I added the line exec /opt/bin/bash to the .profile file of the root-user. However, now I am unable to login as root anymore. The error message "-ash: exec: line 22: /opt/bin/bash: not found" is displayed in the terminal window and the session is ended. Can you please help me out?
bash: /opt/bin/notexistingshell: No such file or directory
Connection closed by foreign host.
So... my quandary is that I can't log in to edit /etc/passwd, and I need to edit /etc/passwd to enable login.
Users browsing this forum: Google [Bot] and 3 guests