Manually adding a user to a Solaris system with Automount enabled

If you need to add a new user (and group) to a Solaris system but do not have a graphical display attached to it then you will have to add the user from the command-line. Since home directories for users on Solaris are traditionally stored in /home then you would expect to be able to add the new user as follows:

# groupadd somegroup
# useradd -g somegroup -d /home/someuser -m someuser
# chown someuser:somegroup /home/someuser
# passwd someuser ... and assign a valid password

However, if your Solaris system is using the Automounter, then the /home directory will actually be under the control of the automounter and you will not have the permissions to create the directory there. Instead, you must create it in /export/home and tell the automounter about it, as follows:

# groupadd somegroup
# useradd -g somegroup -d /export/home/someuser -m someuser
# chown someuser:somegroup /export/home/someuser
# passwd someuser ... and assign a valid password
# vi /etc/auto_home ... and add the following line (after the +auto_home line)
someuser 127.0.0.1:/export/home/someuser

You should now be able to log in as the new user.