Hello Tomas,
Tomas Rippl wrote on Tue, Jan 28, 2025 at 10:12:11AM +0100:
> I tried to change the user2's home directory from /home/user2
> to /home/user2/MyWD.
Why would you do something like that?
Not sure whether is dangerous, but it doesn't feel useful either.
I never heard of anybody doing something like that.
> I did this by altering the sixth field of /etc/
> passwd of this user's record. However, it did not work (user2 still
> ends up in /home/user2 after login or when I issue su -l user2 while
> being logged in as user1. I also searched all the dot files in user2's
> home directory for '$HOME' but found no other place where it is set.
> And being logged in as user2, when I issue:
> HOME=/home/user2/MyWD
> export HOME
> cd
> I really end up /home/user2/MyWD.
> What am I missing?
$ man master.passwd pwd_mkdb vipw
Editing automatically generated files rarely ends well.
Yours,
Ingo
No comments:
Post a Comment