[Samba] winbind: auto create home directories
Leon at dragonparadise.com
Tue Mar 16 10:35:32 GMT 2004
I'm running samba 3.0.2a as a windows domain MEMBER, security=ADS.
Just installed winbind last week it it looks great.
I noticed that it is possible to set a homedir_template for winbind;
however winbind has no option to create this directory on the fly (and
populate it with .profile etc).
I found the code for pam_mkhomedir to have pam session create the
homedirectory when a session is established via the pam mechanism.
Then I found that when opening a xterm using rexec the pam session does not
get triggered, i.e. no home directory created... (weird...).
Then why not have winbind create the homedirectory... it got the template
I patched winbindd_user.c and inserted most of the pam_mkhomedir.c code in
it. It seems to work great except that when the user logs on as USER1 and
next time as user1 it will create the directory 2x in both lower and
upercase... (I have logged this behavior as a bug on bugzilla).
Anybody else worked on this, interested in my code? making this a standard
enhancement in winbind?
I would love to see added to smb.conf the following parameters:
- umask for creating home directories
- a flag to create homedirs yes/no
- a 'skel' directory where initial files are copied from to setup a new
I wonder if the place where I inserted the create_homedir() is appropriate...
More information about the samba