Date: Wed, 22 Aug 2001 15:01:11 +0100 From: Paul Branston <apbran@rannoch.demon.co.uk> To: Odhiambo Washington <wash@wananchi.com> Cc: FBSD-Q <freebsd-questions@freebsd.org> Subject: Re: One for the script gurus Message-ID: <20010822150111.I24704@rannoch.demon.co.uk> In-Reply-To: <20010822163649.B98728@ns2.wananchi.com>; from wash@wananchi.com on Wed, Aug 22, 2001 at 04:36:49PM %2B0300 References: <20010822163649.B98728@ns2.wananchi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 22, 2001 at 04:36:49PM +0300, Odhiambo Washington wrote: > You have your /etc/passwd file and from it you want to create a home > directory for every user in it. I am imagining how to extract that info > from the file and use it to feed some script that would do what I want. > I am imagining some emergency situation where my /home tape backup has > goofed. > I leave it you to, please. > > Thanks. > > -Wash > > -- > Odhiambo Washington > Wananchi Online Ltd., > wash@wananchi.com 1st Flr Loita Hse. > Tel: 254 2 313985 Loita Street., > Fax: 254 2 313922 PO Box 10286,00100-NAIROBI,KE. > > In case of doubt, make it sound convincing. awk -F: '{print "mkdir /home/"$1 " && chown "$1":"$1 " /home/"$1 }' < passwd |sh or similar -- /* * Paul Branston */ 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?20010822150111.I24704>