[4875] in WWW Security List Archive

home help back first fref pref prev next nref lref last post

Re: Changing a users UNIX home dir from a shell script

daemon@ATHENA.MIT.EDU (Matthew)
Sat Mar 22 14:20:21 1997

Date: Sat, 22 Mar 1997 11:51:04 -0500
To: Steve Seymour <darkstar@gpo.sonnet.co.uk>
From: Matthew <matt@ultimatetv.com>
Cc: "www-security@ns2.rutgers.edu" <www-security@ns2.rutgers.edu>
In-Reply-To: <01BC3617.90C664C0@darkstar.sonnet.co.uk>
Errors-To: owner-www-security@ns2.rutgers.edu

At 04:47 PM 03/21/1997 -0000, Steve Seymour wrote:
>Hi,
>
>We are in the process of implementing a series of shell scripts on a BSD
OS machine and have come accross a problem. 
>
>We need to be able to change a users home directory without re-creating
the user. If it wasn't going to be done from a script, 
>could quite easily use chpass or even vipw but neither can be used from a
script. I realise this is a bit off the topic of www-security, but the
system is implemented on an _internal_ web server so I thought it would be
worth a try!
>
>If anyone has any solutions based on perl or the C shell or anything that
can be driven from the command line, I would be grateful to hear about them
or any pointers in the right direction.
>

The Simplest of solutions would be to make the users's home directory some
name like /user/NAME and then make /user/NAME softlinked to the real
directory.  Then when you need to change their home dir, you just delete
the link and make a new one.


Matt Soffen
 ========================================================  Boss    - "My
boss says we need some eunuch programmers."
 Dilbert - "I think he means UNIX and I already know UNIX."
 Boss    - "Well, if the company nurse comes by, tell her I said never mind."
                                       - Dilbert -
  =======================================================

home help back first fref pref prev next nref lref last post