Problem with login not setting variables correctly?
I'm trying to add a user in Solaris, which I can do. However, there are problems when I login as the newly added user:
As root:
- Created the jdoe account: 'useradd jdoe'
I verified the jdoe account was created via useradd by looking at /etc/passwd.
- Create a home directory for the user named 'jdoe': 'mkdir /local/home/jdoe'
I've also tried this with /home/jdoe after disabling autofs.
- Change the owner of /local/home/jdoe to jdoe: 'chown jdoe /local/home/jdoe'
- Set jdoe's home directory to /local/home/jdoe: 'usermod -d /local/home/jdoe'
I've also tried setting the home directory as a parameter to useradd.
- Modify the jdoe account password: 'passwd jdoe'
Enter the new password twice
Now, when I login as jdoe, and type 'cd', I go to /local/home/darrylm. darrylm is my main login...the one I login with when the machine starts. The default shell for jdoe is /bin/sh.
jdoe:x:112:1:John Doe:/local/home/jdoe:/bin/sh
For some reason, these four variables: HOME, LOGNAME, USER, and MAIL are set to /local/home/darrylm, darrylm, darrylm, and /var/mail/darrylm respectively when I'm logged in as jdoe. I found this page: http://docs.sun.com/app/docs/doc/817-1985/6mhm8o5lf?a=view which states:
LOGNAME
Defines the name of the user currently logged in. The default value of LOGNAME is set automatically by the login program to the user name specified in the passwd file. You should only need to refer to, not reset, this variable.
For some reason, the four variables above are not being set properly. How can I solve this problem?
Thanks,
-darrylm

