User home directory issue

solaris

recently i have created the user on solaris it has been created successfully when i see the details of the user by logins and id command it shows all the details but when i am trying to switch that user and cd to its directory it throws error like no directory. What would be the possible cause. User is not getting his directory

Below is the output of some command :
bash

bash-3.2# id user1
uid=6032(user1) gid=300(mqm)

bash-3.2# logins -x -l user1
user1        6032    mqm             300
                        /export/home/user1
                        /usr/bin/ksh
                        PS 020515 7 91 7
bash-3.2# su - user1
su: No directory!
bash-3.2# cat /etc/passwd | grep -i user1
user1:x:6032:300::/export/home/user1:/usr/bin/ksh
bash-3.2# cd /export/home/user1
bash: cd: /export/home/user1: No such file or directory

Best Answer

The directory

/export/home/user1

Does not exist. You will need to create it

mkdir /export/home/user1

You'll then need to set the ownership using chown. You'll also need to create dotfiles.


It may be easier at this point to remove the user see userdel -r and recreate it using the -m switch to useradd, this will create the users home directory etc

Oracle have some great documentation on this, you really need to read it.

Related Topic