Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2002 16:15:06 +0200
From:      "Patrick O'Reilly" <bsd@perimeter.co.za>
To:        <johann@broadpark.no>, <questions@FreeBSD.ORG>, "Ben Kadish" <Ben.Kadish@happcontrols.com>
Subject:   Re: Redistributing adduser's dotfiles to users
Message-ID:  <016401c1dcac$49aaa3d0$b50d030a@PATRICK>
References:  <5.1.0.14.0.20020405074521.029a37b8@mail.happcontrols.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message -----
From: "Ben Kadish" <Ben.Kadish@happcontrols.com>


> #!/bin/sh
>
> for user in /home
> do
>          cp /usr/share/skel/.* /home/$user
>          chown $user.group /home/$user/.*
> done
>
> That's my suggestion.
>

The trick which will trip up this script is that the skeleton files in
/usr/share/skel/ are named dot.profile and dot.bashrc, etc.  So the 'cp'
needs to be a little smarter to actually rename the file, something like
this:

cp /usr/share/skel/dot.profile /home/$user/.profile

I've posted another reply to johann's question which will address this
problem :)

Regards,
Patrick O'Reilly.
    ___        _            __
   / _ )__ __ (_)_ __ ___ _/ /____ __
  / __/ -_) _) /  ~  ) -_), ,-/ -_) _)
 /_/  \__/_//_/_/~/_/\__/ \__/\__/_/
    http://www.perimeter.co.za




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?016401c1dcac$49aaa3d0$b50d030a>