[Samba] pam_mkhomedir.so

Andrew Bartlett abartlet at samba.org
Wed Mar 12 10:43:06 GMT 2003


On Wed, 2003-03-12 at 20:16, borpeter at post.cz wrote:
> Hi!
> 
> This error appears as answer to browse home directory from WinXP
> on Samba server2.27 on Mandrake9.0: 'Can't change directory to
> /home/DOMAIN/user (No such file or directory)'
> 
> Here is my etc/pam.d/samba :
> #%PAM-1.0
> auth sufficient /lib/security/pam_winbind.so
> auth required /lib/security/pam_nologin.so
> auth required /lib/security/pam_stack.so service=system-auth
> account sufficient /lib/security/pam_winbind.so
> account required /lib/security/pam_stack.so service=system-auth
> session required /lib/security/pam_mkhomedir.so skel=/etc/skel/
> umask=0022  session required /lib/security/pam_stack.so
> service=system-auth
> password required /lib/security/pam_stack.so service=system-auth
> 
> Here is my etc/pam.d/sshd :
> #%PAM-1.0
> auth sufficient /lib/security/pam_winbind.so
> auth required /lib/security/pam_stack.so service=system-auth
> auth required /lib/security/pam_nologin.so
> account sufficient /lib/security/pam_winbind.so
> account required /lib/security/pam_stack.so service=system-auth
> password required /lib/security/pam_stack.so service=system-auth
> session optional /lib/security/pam_mkhomedir.so skel=/etc/skel/
> umask=0022  session required /lib/security/pam_stack.so
> service=system-auth
> session required /lib/security/pam_limits.so
> session optional /lib/security/pam_console.so
> 
> Problem is how to setup samba for automatic home directory
> creating. Maybe smb.conf is incorrect, but if I create home
> directory manually, samba log me in without problems.

Have you set 'obey pam restrictions = yes' in your smb.conf?

> Second question.Computers in network are under W2k PDC. Everytime
> I try to login into Mandrake via putty(ssh) and I'm not as local
> user (on mandrake) but I'm domain user, pam_mkhomedir.so writes
> this:'Can't change directory to /home/DOMAIN/user (No such file
> or directory)'. But if I manually create directory /DOMAIN under
> /home and change mode for /DOMAIN to 777 then directory /user
> will be create automatically. But this is valid only for ssh
> access. Samba still does not create directory /user.

You shouldn't need to make it 777, but you might have a buggy OpenSSH
(privsep broke a number of things like this - there are patches
currently in their bugzilla to test fixes)

> So. I need to setup auto creat of directory:/home/DOMAIN/user for
> each service.
> 
> Next question is, if is possible to configure all of services
> (login, telnet, ftp, ssh, samba, kde...) centrally in one file or
> somewhere. Or it is not possible?

That's what the system-auth stuff is about.

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20030312/87614941/attachment.bin


More information about the samba mailing list