Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-26-2005, 09:10 AM
|
#1
|
Member
Registered: Jan 2005
Location: USA
Distribution: Red Hat, CentOS, Fedora, Suse
Posts: 54
Rep:
|
Home Directory Script
All,
I recently installed K12LTSP on my network and now have it authenticating users against a W2K3 ADS via winbind. I am running into a problem however.
I have a fairly large network with quite a few users and would like the ability to have a script get the AD user information and create home folders for me so that I don't have to create each one individually. I checked out the file 'README.pam_mkhomedir' located in /usr/share/doc/pam and was unable to get the 'session required pam_mkhomedir.so skel=/etc/skel/ umask=0022' add on line to work in my /etc/pam.d/login file.
Has anyone successfully created a script that can grab active directory user information and automatically create home folders for them on Linux? If not, can someone point me in the right direction? Thanks in advance.
-dumbsheep
|
|
|
10-27-2005, 04:18 PM
|
#2
|
Senior Member
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075
Rep:
|
Yes, I've done this. I found that pam_mkhomedir didn't seem to actually work in practice. The first time that the user logged in the login could fail since the home directory and the files didn't exist for the login to complete.
In the end I simply wrote a Perl script and put it in cron to run every hour. It ran wbinfo -u to fetch a list of users, and compared this with a list of the directories under /home. If no home directory existed for a username it created one, copied in the contents of a template directory, and reset the permissions on the new directory.
|
|
|
10-28-2005, 10:50 PM
|
#3
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
|
|
|
All times are GMT -5. The time now is 07:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|