useradd -u 200 -d /export/home/oracle -g oinstall -G dbadmin -m -s /bin/bash -c “RDBMS install user” oracle
Now, what does it mean?
-u = userid (it is convenient to keep this the same on multiple systems)
-d = home directory
-m = make the home directory if it doesn’t exist (believe me, it’s quite frustrating if you don’t (know) use this one.)
-s = which shell to use
-c = comment about the user
and at the end the user’s username.
source https://docs.sun.com/
UPDATE::
I noticed that the order in which the flags are given are important on version 11.2:
source https://docs.oracle.com/ & Jeff Taylor’s Weblog
And let’s add some X11 related packages in the mix so we can connect via an X-terminal:
pkg install xauth
pkg install x11/diagnostic/x11-info-clients
pkg install xclock
pkg install library/motif