Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-15-2007, 11:14 AM   #1
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Rep: Reputation: 30
Auto Create user home directory on Samba

Hello all,

if i create a new user on the win 2003 active directory and specify a home user under profile i will get " the home folder could not be created because: the network name cannot be found" I know for sure I am getting that error because the user home folder doesn't exist yet on the samba machine - is there any way to get the user home created automatically once a new user are added to active directory.

Note: If the new user log in the linux terminal the home user will be created automatically because i am using session required /lib/security/$ISA/ skel=/etc/skel umask=0077
in my pam.d/system_auth. how do i get the same thing working when i create a user with active directory.

Thanks for you help

security = ADS
workgroup = CAD
netbios name = itbox
preferred master = no
password server =
client use spnego = yes
server signing = auto
encrypt passwords = yes
winbind separator = +
idmap uid = 1000-20000
idmap gid = 1000-20000
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes
winbind cache time = 0
winbind nested groups = yes
template homedir = /home/%D/%U
template shell = /bin/bash
log file = /var/log/samba/%m.log
log level = 3
max log size= 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
hosts allow = 192.168.1. 192.168.0. 127.
comment = Home Directories
valid users = %S
read only = No
browseable = No
path = /data
public = yes
writable = yes
browseable = yes
Old 01-15-2007, 11:24 AM   #2
Registered: Aug 2003
Location: Indiana
Distribution: fc6 sles9 & 10 kubuntu ubuntu-server
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
Do you have a system-auth-winbind in your pam.d directory? If not create one and add the following entries in it:
auth        required
auth        sufficient
auth        sufficient likeauth nullok use_first_pass
auth        required

account     sufficient
account     required

password    required retry=3
password    sufficient nullok use_authtok md5 shadow
password    required

session     required skel=/etc/skel/ umask=0022 
session     required
session     required
In you smb.conf make sure that you have
obey pam restrictions = Yes
This is what we use on our samba+ldap domain and previously on the nt4 domain. I can't guarantee it'll work on AD but it's worth a shot.
Old 01-15-2007, 11:56 AM   #3
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
Thanks for the reply

No it didn't work I still have to go on the linux machine and manually create the user home folder first then create or modify the user on the win 2003 AD.

I did create the system-auth-winbind as you mentioned and made sure to have obey pam restrictions = Yes in my smb.conf however it didn't work -

do i need to make a change in the pam.d/samba??



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Active Directory User Cannot Write to Samba Home Directory jonwatson Linux - Networking 2 12-19-2006 12:40 PM
home directory auto create problem bobthehorrible Linux - Networking 2 10-13-2005 09:54 AM
create ftp user for vsftpd server without home directory cccc Linux - Networking 2 07-30-2005 06:32 AM
Samba :share files from home directory to an other user flashdelux Linux - Software 0 11-29-2004 12:57 PM
adding a new user doesn't create a home directory abrakadabra Linux - General 6 08-09-2002 08:11 PM

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration