LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-10-2003, 11:31 AM   #1
ferrantepunto
Member
 
Registered: Apr 2002
Distribution: Mandrake - Red Hat - SuSE
Posts: 57

Rep: Reputation: 15
Creating home directories with samba and PAM mkhomedir


Hi there,

I´m configuring a samba server using RH8 to be integrated as part of a Windows 2000 domain.

As a result of this, I need to setup a way to authenticate my existing Windows users in the samba machine without creating them in the Linux box again.

I´ve installed Winbind, and it works, using PAM modules. But when I try to integrate the PAM module mkhomedir, to create the home directories of the windows users in the samba box, the users cannot longer connect to the samba server. My public dir still works, but users cannot longer connect to their private home directories, it keeps asking for a username and password. My winbindd, smbd and nmbd daemons are up and running, and I can view my windows 2000 domain users and groups through winbind.

Here is my smb.conf:

[global]
workgroup = Labdomain
server string = Nas Server
netbios name = Nas
printcap name = /etc/printcap
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
max log size = 0
#password server = *
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
;local master = no
wins support = yes
guest ok = yes
security = server
dns proxy = no

[homes]
comment = Home Directories
browseable = no
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775
map to guest = bad user

[printers]
comment = Color Printer
path = /var/spool/samba
browseable = no
printable = yes

[public]
comment = Public Dir
path = /home/public
writeable = yes
guest ok = yes
browseable = yes
read only = no
public = yes
only guest = yes

When I wasn´t using the PAM modules, and I created my smbusers, I was able to connect to their private dirs and samba created them automatically, but I need to create the users in the linux box first.

What I want is: Some way to tell the Linux box to create home dirs for the windows users without creating them again in the linux box. I know that this is possible, but I want to know how to configure correctly the PAM modules.

Thanks in advance.
 
Old 01-21-2004, 07:18 AM   #2
datalord7
LQ Newbie
 
Registered: Jan 2004
Location: uk
Posts: 6

Rep: Reputation: 0
MKhomedir

hi from what i gather you want a home dir made for an nt user when they connect to the samba machine??? and you want these dirs made in a place of your choosing? ie /ntdomain/<username>

i have been trying to do this for some time now and it is driving me crazy and i am by no means an expert but from what i gather this is what you are meant to do, this may need tweaking a little

first of all you need to make the dir where you want nt profiles stored i used /samba/profiles

and make sure this is writeable

now create a skeleton folder the will be copied to the users home dir when it is created i used /samba/sambaskel

this can contain desktop setting for windows etc

then in your smb.conf file in the globals you need line template homedir = /samba/profiles/%U

change this as you will to suit your dir structure


then in file /etc/pam.d/samba at the top of the session part you need


session required pam_mkhomedir.so skel=/samba/sambaskel umask=0022


please note i have yet to get this to work and if you have any ideas that may help they would be greately appreciated

ill keep you updated of my progress



regards
matt
 
Old 01-21-2004, 09:13 AM   #3
aigartua
Member
 
Registered: Dec 2002
Location: Xalapa, Ver. México
Distribution: Red Hat
Posts: 108

Rep: Reputation: 15
check this tread, http://www.linuxquestions.org/questi...hreadid=136269
 
  


Reply



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
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
Samba does not allow writing to public shares / browsing home directories disallowed Xolo Linux - Software 6 02-14-2005 04:22 PM
samba: home directories not visible flipboi Linux - Networking 1 05-27-2004 11:06 PM
Samba and Home Directories dlucas10 Linux - Networking 5 10-28-2003 12:51 PM
mounting home directories from samba? tommyj27 Linux - Networking 2 08-27-2003 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:38 AM.

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