*different* home directory issue
I have my users' home directories where I want them so it's not that "/export/home vs /home" problem I don't think. It seems that all users (root included) have the same home despite being clearly different in /etc/passwd. That is to say that regardless of who logs in, they are taken to the home directory of the first user I made when typing "cd". So if user2 logs in he is taken to user1's home and must go to his home manually by typing "cd ../user2" for example. Root even uses user1's home. My /etc/passwd file looks like this:
root:x:0:0:Super-User:/:/bin/sh daemon:x:1:1::/: bin:x:2:2::/usr/bin: sys:x:3:3::/: adm:x:4:4:Admin:/var/adm: lp:x:71:8:Line Printer Admin:/usr/spool/lp: uucp:x:5:5:uucp Admin:/usr/lib/uucp: nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico smmsp:x:25:25:SendMail Message Submission Program:/: listen:x:37:4:Network Admin:/usr/net/nls: gdm:x:50:50:GDM Reserved UID:/: webservd:x:80:80:WebServer Reserved UID:/: nobody:x:60001:60001:NFS Anonymous Access User:/: noaccess:x:60002:60002:No Access User:/: nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/: user1:x:100:1::/home/user1:/bin/bash user2:x:101:1::/home/user2:/bin/bash I can't figure out why it's acting this way. Any insight? |
What is the name of this directory everyone is going to ?
No error messages ? What echo $HOME says ? |
The directory is /home/user1
echo $HOME gives "/home/user1" I stopped the automounter and use /home. |
what gives "type cd" ?
|
that gives
"cd is a shell builtin" |
This is strange, run
Code:
id |
id gives
"uid=101(user1) gid=1(other)" echo $HOME as before, gives "/home/user1" cd still goes to /home/user1 pwd gives the same for all users, including root: "/home/user1" |
Id give user1 for root ???
|
No id gives what is expected for root:
"uid=0(root) gid=0(root)" It's just pwd that gives the same for everyone |
This is still weird, please run these commands and post the results:
Code:
exec login root |
The result is:
user1@thehost: ~::exec login root Password: Not on system console root@thehost: ~::id uid=0(root) gid=0(root) root@thehost: ~::echo $HOME /home/user1 root@thehost: ~::pwd /home/user1 root@thehost: ~::echo $SHELL /bin/bash root@thehost: ~::ptree $$ 392 /usr/lib/ssh/sshd 638 /usr/lib/ssh/sshd 641 /usr/lib/ssh/sshd 643 -bash 647 bash 652 bash 678 bash 683 bash 687 bash 688 bash 693 bash 699 bash 701 bash 758 bash 805 bash 961 ptree 805 |
As login fails, the rest of the command results are useless ...
Well, run again these commands either while already logged in locally, or after allowing root to log in remotely by commenting out the CONSOLE line in the /etc/default/login file. And please enclose your results with "code" tags.. |
I was logged in as root whilst running those commands. If I allow remote login as you specified and attempt to login as root from another user I get
Code:
user1@thehost: ~::exec login root |
Ok, that looks almost correct, and doesn't exhibit the problem you are complaining of, being all users home being "/home/user1", even for root as you wrote in your first posting:
Quote:
My first guess is you have messed up either your /etc/profile or /.profile |
I guess the difference is when using "su" instead of "exec login". When I log in normally and just su between accounts this behavior occurs. I thought they were the same. Thanks for your help.
|
All times are GMT -5. The time now is 07:44 PM. |