[K12OSN] HELP!! creating bulk users

Kemp, Levi lnkemp at bolivar.k12.mo.us
Sat Aug 25 04:16:27 UTC 2007


This may not help at all, but could you use pam_mkhomedir? I realize that they arn't actually logging into the server so thay may not work, but it was a thought.

Levi Kemp
Technology Specialist
Bolivar R-1 Schools
417-328-8943
lnkemp at bolivar.k12.mo.us



-----Original Message-----
From: k12osn-bounces at redhat.com on behalf of Randall Swift
Sent: Thu 8/23/2007 7:46 PM
To: Support list for open source software in schools.
Cc: Support list for open source software in schools.
Subject: Re: [K12OSN] HELP!! creating bulk users
 
Unfortunately, I do not understand your commands. I also have to have a
way to do this that will work as this is a production server. I would just
blow this away and start over but the users passwords have already been
put into there schedule. I am also unsure if I create the users again
using the bulk user script (from matt oquists smbldap-installer) that it
will still not create the home directories. Is there something wrong with
this script? I need help!

"Support list for open source software in schools." <k12osn at redhat.com>
writes:
>ahhh you need one of those lovely 'awk/sed' scripts that Les pimps out..
>
>that parses your /etc/passwd file and strips out the username and group 
>and does a
>mkdir -p /home/<username>
>then does a
>chown -R <username>:<group>
>then does a
>chmod 700 /home/*
>
>if only scripting were as easy as english!
>
>--Huck
>p.s. maybe this old gem I have tucked away in my archives will be of 
>assistance...
>
>[quote]
>
>Assuming all teacher names end in two digits and none of the students
>account names do this one liner may work:
>
>for teach in `cat /etc/passwd | awk '{FS=":";}{print $1}' | \
>egrep "[0-9][0-9]" ` ; do dir=/var/www/html/${teach}; mkdir $dir;\
>chmod 775 $dir ; cd /home/${teach}; ln -s $dir ${teach}.html; done
>
>not tested or debugged, use at own risk, beware of gnats etc..
>[/quote]
>
>_______________________________________________
>K12OSN mailing list
>K12OSN at redhat.com
>https://www.redhat.com/mailman/listinfo/k12osn
>For more info see <http://www.k12os.org>



Randy Swift
Network Administrator
Leavitt Area High School
Turner, Maine 04282
(207)225-3533
swift at msad52.k12.me.us

_______________________________________________
K12OSN mailing list
K12OSN at redhat.com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4144 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/k12osn/attachments/20070824/5eabffa0/attachment.bin>


More information about the K12OSN mailing list