Operating System - HP-UX
1820057 Members
3042 Online
109608 Solutions
New Discussion юеВ

Creating a user with a pre-existing directory

 
SOLVED
Go to solution
dictum9
Super Advisor

Creating a user with a pre-existing directory

On 11.23, I am creating a user with a home directory being a preexisting directory such as /apps/acta/staging/incoming. I used -d switch and did not use -m -k /etc/skel as I always do.

The /etc/password string looks good. However, when I su to that newly created user, and do pwd, I end up in "/apps" directory, why is that?
4 REPLIES 4
Ivan Ferreira
Honored Contributor
Solution

Re: Creating a user with a pre-existing directory

Did you "su -" to that user or just "su". You must use the "-" option to initialize the environment.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Creating a user with a pre-existing directory

Shalom,

A mistake in /etc/skel ?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Chris Wilshaw
Honored Contributor

Re: Creating a user with a pre-existing directory

I'd check the .profile for that ID - it could simply be that somewhere in there, it runs

cd /apps

You can also check to make sure it's set up with the correct home directory using

echo $HOME

This should display the same string that you've seen in /etc/passwd
F Verschuren
Esteemed Contributor

Re: Creating a user with a pre-existing directory

It you dit a su - and end up in /appl than normaly /appl/acta does not exists...