how change home dir?

how change home dir?

Post by sjfr.. » Sat, 26 Aug 2000 04:00:00



How can I change my home directory?  Is there anything more to it than
editing the line in /etc/passwd?

sjfromm

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

how change home dir?

Post by James A. William » Sat, 26 Aug 2000 04:00:00


In addition to that, you have to make the new home directory (probably as root)
and change the owner and group of that new directory to you.

> How can I change my home directory?  Is there anything more to it than
> editing the line in /etc/passwd?

> sjfromm

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

how change home dir?

Post by gro.. » Sat, 26 Aug 2000 04:00:00




> In addition to that, you have to make the new home directory (probably
as root)
> and change the owner and group of that new directory to you.


> > How can I change my home directory?  Is there anything more to it
than
> > editing the line in /etc/passwd?

> > sjfromm

> > Sent via Deja.com http://www.deja.com/

you can do it pretty easily in admintool

Quote:> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.
 
 
 

how change home dir?

Post by Rich Tee » Sat, 26 Aug 2000 04:00:00



Quote:> How can I change my home directory?  Is there anything more to it than
> editing the line in /etc/passwd?

You *could* do it that way - but therein lies the path to madness.  Use
usermod instead.  Or, if you're using the automounter, just change your
auto_home map, restart automountd, and away you go (yet another reason why
turning off the automounter to use /home - or just using /export/home for
home directories - is generally a bad idea).

--
Rich Teer

NT tries to do almost everything UNIX does, but fails - miserably.

The use of Windoze cripples the mind; its use should, therefore, be
regarded as a criminal offence.  (With apologies to Edsger W. Dijkstra)

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

how change home dir?

Post by fromm2.. » Sat, 26 Aug 2000 04:00:00



group.com>,


> > How can I change my home directory?  Is there anything more to it
than
> > editing the line in /etc/passwd?

> You *could* do it that way - but therein lies the path to madness.
Use
> usermod instead.  Or, if you're using the automounter, just change
your
> auto_home map, restart automountd, and away you go (yet another
reason why
> turning off the automounter to use /home - or just using /export/home
for
> home directories - is generally a bad idea).

Why is it mad?  The only reason I can think of is that one might make
an error editing /etc/passwd.  Is there any other reason?

Why is using /export/home a bad place for home directories?

sjfromm

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

how change home dir?

Post by Rich Tee » Sat, 26 Aug 2000 04:00:00



Quote:> Why is it mad?  The only reason I can think of is that one might make
> an error editing /etc/passwd.  Is there any other reason?

That's basically the reason.  Usermod has certain sanity checks in it
that vi doesn't (e.g., it checks that the shell you specify is valid).
If some mistakes are easily preventable, why not prevent them!  Also,
more usage of usermod would result in much less "I tried to change
root's shell, and now I can't log in" threads here!

Quote:> Why is using /export/home a bad place for home directories?

I need to be more precise: /export/home is the place for the home
directories, but specifying /export/home as one's home directory
is IMHO a Bad Thing.  To better illustrate, my home directory is
physically stored in /export/home/rich - but my /etc/passwd entry
lists /home/rich as my home directory.  The automounter fills in
the blanks.

It's far better to set up everyone's home directory in /etc/passwd
or NIS(+) as /home/$USER, and then use the automounter to put things
in the right place.  SO, you could start off with /export/home being
the place where people's home directories really live.  Then, when that
disk gets full, you add another, say /export/anotherhome, and all
new user accounts created in there.  However, as far as you're concerned,
everyone is under /home - much easier and more flexible!

--
Rich Teer

NT tries to do almost everything UNIX does, but fails - miserably.

The use of Windoze cripples the mind; its use should, therefore, be
regarded as a criminal offence.  (With apologies to Edsger W. Dijkstra)

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

how change home dir?

Post by Tony Walto » Thu, 31 Aug 2000 04:00:00




> group.com>,


> > > How can I change my home directory?  Is there anything more to it
> than
> > > editing the line in /etc/passwd?

> > You *could* do it that way - but therein lies the path to madness.
> Use
> > usermod instead.
{snip}

> Why is it mad?  The only reason I can think of is that one might make
> an error editing /etc/passwd.  Is there any other reason?

Along with the reason you state, consider what would happen if

- You started to vi /etc/passwd

- Another user changed their home directory using (say) usermod or
passwd

- You wrote back your changes

Use usermod or passwd -h (or passmgmt -m if you prefer and have root
privileges) or even /usr/ucb/vipw as these will make sure that the
password file is locked appropriately while you're changing it.

--
Tony

This posting does not constitute official support from Sun Microsystems

 
 
 

1. after changing a user's home dir, cd ~user in ksh still use old dir

See example below:

[julie:/export/home/root]grep oracle7 /etc/passwd
oracle7:x:65535:65535:Oracle Workgroup Server user:/opt:/usr/bin/sh
[julie:/export/home/root]cd ~oracle7            
ksh: /opt/oracle7:  not found

Please note another subshell will do fine:

[julie:/export/home/root]/bin/ksh
[julie:/export/home/root]cd ~oracle7  

What does this mean? Thanks.
--
Michael Wang
http://www.mindspring.com/~mwang

2. WANTED: 2 Sparc 10's.

3. MC msg: Couldn't change to home dir

4. GNOME comment...

5. Changing default rights in home dirs?

6. Dip locking..

7. passwd core dumping on home dir change

8. IDE CD without ID HD????

9. changing permissions on home dir on sunos 5.7

10. how to get apache to translate server/dir to home dir?

11. Apache MultiViews: /dir returns /dir/, not dir.html

12. weird... can't put a cd \dir\dir\dir\ in a .csh file...

13. How to make a dir not in /home/ftp available anonymously