PINE64

Full Version: $HOME variable over SSH
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everone,

I just booted postmarketOS from my SD card and logged into it over SSH. I noticed that
Code:
cd ~
takes me to /root and not to /home/user. Is there a reason for that and can it be changed? I tried
Code:
usermod -d /home/user user
but it only said
Code:
usermod: no changes
What user are you logged in as?
$ whoami

What shell are you running?
$ ps

What does /etc/passwd list as user's home directory? (Second-to-last field)

My first guess is you're getting logged in as root since nobody else should have /root set as their home directory.
(06-26-2020, 02:45 PM)Dendrocalamus64 Wrote: [ -> ]My first guess is you're getting logged in as root since nobody else should have /root set as their home directory.
Sounds like this is it really. `cd ~` definitely brings me to my home directory and the only real explanation would be executing that command as root.
Thank you for your replies. I don't remember which user it was but have not had an issue with it anymore. Thank you