Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: steve288 on April 25, 2008, 10:30:54 PM
-
I make some manual changes to the root password line in /etc. I was trying to add additional paths.
Obviously I had the fields wrong and have screwded up the root line in the password file. Now cant log in as root via putty. I have searched the contribs and see various notes about using control X at boot to log in as single but I dont get boot: and the instructions do not seem to line up with the 7.3 version. I also read that I could just change the admin password from the server-panel and that will change the password for the root as well. It appears they are the same password. (I didnt know that)anyway I tryed to change it but while the password did change for the admin the root still is not accessible. I suppose I need to get into a terminal mode and clean up the password file I messed up.
Any suggestions.
-
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Reset_the_root_and_admin_password
-
Thanks I will give it a try.
-
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Reset_the_root_and_admin_password
That won't necessarily work if the format of the passwd or shadow file has been broken.
If all else fails, Steve should be able to boot from the CD in rescue mode. And hopefully he has learnt his lesson and will never, ever directly edit the passwd file again!
-
I make some manual changes to the root password line in /etc. I was trying to add additional paths.
Paths aren't set in the passwd file. Which file in /etc did you edit?
-
It was the /etc/passwd file
-
It was the /etc/passwd file
And how did you add "additional paths" there?
You won't try that again, right?
-
Yes your right.
I had thought that you could add it to one of the fields, I have forgotten alot of linux/unix stuff since I dont deal with it much now.
I logged in as single user. Went to /etc/passwd deleted the string I added reset password and it worked. The line I changed was the last field which actually after pulling out my Unix book is the shell that the login uses. As I think about paths Im beginning to recall now that the path is set in the home dir of the user in the .bash_profile . Im setting up a new computer and want to put some short form commands into my own root/bin . So I want to put that dir in the path.
Regards
-
Im setting up a new computer and want to put some short form commands into my own root/bin . So I want to put that dir in the path.
Just create a
~/.bashrc
file and put the aliases and commands in there and if you would lik to have them system wide edit the /etc/bashrc file (as this is one of the few files that is not templated on SME Server).
If you really like you could add nexecutables and binary in ~/bin as it should be added to the path automatically.
-
Great thanks