Skip to main content

You are here

User creations in Solaris 11

To my surprise Solaris 11 does not create new user's home directory by default.

Errors:

[email protected]:~# su - testuser
su: No directory!
[email protected]:~# pwck
[....]
testuser:x:106:10::/export/home/testuser:/usr/bin/bash
Login directory not found

Fix:

[email protected]:~# useradd -m testuser
80 blocks

In the process, I learned something new about the su command. In Linux, when switching from root to a limited user, I used to do the following:

[[email protected] ~]# su tony -

What I did not know was that the above command will indeed load up the PATH of tony, but it will also append root's PATH at end of it which is kind of scary. In theory the command that I wanted to use was `su - username`, luckily this feature is not supported in Solaris 11.

[email protected]:/# su testuser -
bash: /root/.bashrc: Permission denied

Premium Drupal Themes by Adaptivethemes