cancel
Showing results for 
Search instead for 
Did you mean: 

A home directory question

xiaobinyuan
Regular Advisor

A home directory question

I created a user with this:
'useradd -g dba -d /home/oracle oracle'.
but why there is no /home/oracle directory created.
then I just 'mkdir -p /home/oracle' and useradd -g dba -d /home/oracle, but nothing under /home/oracle, not even the .profile..
I'm new about HPUX, I remembered there would be directory with the same name of the user under /home when a user is created under Linux.
So, could someone tell me why, are there any ways to change this?
thanks a lot.
2 REPLIES
Turgay Cavdar
Honored Contributor

Re: A home directory question

Add -m option.
#useradd -g dba -d /home/oracle -m oracle
Duncan Edmonstone
Honored Contributor

Re: A home directory question

As I say several times a day on this site, HP-UX is *not* Linux - do not ass-u-me it will behave the same way.

Reading the man page for useradd would help...

-m Creates the home directory for the new login if it
does not exist. If the home directory exists, the
directory must have read and execute permission by
group, where group is the primary group of the new
login. The -m option must be used to create a
home directory.

so maybe:

useradd -g dba -m oracle

will work???

HTH

Duncan

HTH

Duncan