Quote:
Originally Posted by aditya3098
I was trying to change the home dir for root from /tmp/root to /home/root and made the edits to /etc/passwd. I am now unable to ssh into my kindle as it rejects the password. The thing is, if I use the kindle XTerm, and type in 'login', enter in root as user and my password, it works. How can I get the ssh working again?
Also, if I restore the original passwd file, it gets back to normal
|
The home directory is /root
It is not located under the /home sub-tree.
To move it (which may break other things) you need to change the home directory field of /etc/passwd
And it reads as if you did that part.
The ssh server looks for the matching key in ~/.ssh/authorized_keys
Where home (~) is set to /home/<username>
except for username "root".
Which could be a lookup of /etc/passwd but is more likely hard coded in the ssh server as: /root
Mainly because the home directory of the administrator hasn't changed since K&R (plus others) wrote Unix.
But if your going to move the home directory of root, then you need to move its entire contents (including hidden directories like: .ssh and its contents).
Translation: It reads as if you left the .ssh/authorized_keys file behind when you moved root.