PINE64
$HOME variable over SSH - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: PostmarketOS on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=124)
+---- Thread: $HOME variable over SSH (/showthread.php?tid=10441)



$HOME variable over SSH - ElusivePine - 06-26-2020

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



RE: $HOME variable over SSH - Dendrocalamus64 - 06-26-2020

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.


RE: $HOME variable over SSH - PureTryOut - 06-28-2020

(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.


RE: $HOME variable over SSH - ElusivePine - 07-16-2020

Thank you for your replies. I don't remember which user it was but have not had an issue with it anymore. Thank you