|
Re: lug-bg: userdirmake script
- Subject: Re: lug-bg: userdirmake script
- From: Andrei Boyanov <andrei.boyanov@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 14 Mar 2005 16:04:02 +0200
- Organization: Active Solutions Ltd.
Dimitar Vasilev wrote:
Здравейте! Ако на някой му е полезна долната приумица, да я ползва със здраве.
#!/bin/sh
# userdirmake. 2005 Dimitar Vassilev. Public Domain. Provided "AS IS"
#
PATH=/sbin:/usr/bin/:usr/sbin/
export PATH
exec 2>&1
PASSWDFILE=/etc/passwd
USERLIST=`awk -F: ' $1 {print $1}' $PASSWDFILE`
HOMEPREFIX=
GROUP=
for i in $USERLIST; do mkdir -p $HOMEPREFIX/$i && chown $i:$GROUP $HOMEPREFIX/$i
Тук бих добавил нещо от сорта:
cp -r /etc/skel/* $HOMEPREFIX/$i
--
Andrei Boyanov
CEO of Active Solutions Ltd.
http://activesolutions.bg; http://andrei.activesolutions.bg
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|
|
|