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

[1689 byte] By [darryl_ma] at [2007-11-26 21:23:24]
# 1
> Now, when I login as jdoeHow are you logging in? Does this behavior happen in other methods of login (console, ssh, anything else?)-- Darren
Darren_Dunhama at 2007-7-10 3:02:44 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2
Hello Darren. I can ssh successfully. When I ssh, all four variables are set properly.- darryl_m
darryl_ma at 2007-7-10 3:02:44 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3
Darren,after looking at the man page for su, it looks like su is working correctly. I need to use 'su - jdoe' instead of 'su jdoe' to ensure the jdoe account has the four variable set to jdoe's when su'ing.Thanks,-darryl_m
darryl_ma at 2007-7-10 3:02:44 > top of Java-index,Solaris Operating System,Solaris 10 Features...