Operating System - HP-UX
1753765 Members
5630 Online
108799 Solutions
New Discussion юеВ

Re: 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 2
Turgay Cavdar
Honored Contributor

Re: A home directory question

Add -m option.
#useradd -g dba -d /home/oracle -m oracle

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 run 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


I am an HPE Employee
Accept or Kudo