Re: [Samba] Auto Create user home directory

2007-01-17 Thread M Azer

when i add obey pam restrictions = yes to smb.conf. users home dir is
created when the user login for the first time BUT i also noticed that the
machine name is also being created under the home directory -  i sent out
another email with this question but I didn't get any replies

[EMAIL PROTECTED] CAD]$ ls -l
total 20
drwx-- 3 ad01$ Domain Computers   4096 Jan 17 17:57 ad01_
drwx-- 3 administrator   Domain Users   4096 Jan 17 17:59
administrator
drwx-- 3 cat  Domain Users   4096 Jan 17 18:07 cat
drwx-- 4 mina.azer   Domain Users   4096 Jan 17 17:57 mina.azer
drwx-- 3 vdc2$

as u can see the first and last item are machine accounts .. is that right??


smb.conf
[global]
   security = ADS
   workgroup = CAD
   realm = CAD.TESTDOMAIN
   netbios name = itbox
   preferred master = no
   password server = 192.168.1.6
   client use spnego = yes
   server signing = auto
   encrypt passwords = yes
   nt acl support = no
   obey pam restrictions = yes
   winbind separator = +
   idmap uid = 1000-2
   idmap gid = 1000-2
   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.
[homes]
   comment = Home Directories
   read only = No
   browseable = No
   directory mask = 0700
   create mask = 0700

On 1/15/07, Ed Plese [EMAIL PROTECTED] wrote:


On Mon, Jan 15, 2007 at 12:11:29PM -0500, M Azer wrote:
 now that all permissions are right - 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/pam_mkhomedir.so 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.

You might try adding the following to your smb.conf file:

[global]
  obey pam restrictions = yes


Ed Plese


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Auto Create user home directory

2007-01-15 Thread Dale Schroeder
I see you have template homedir = /home/%D/%U.  Did you create the 
directory /home/CAD?  It is not created automatically, and that is one 
thing that seems to be left out of the how-to's.  I set the directory 
permissions to 770, owned by root*:*DOMAIN+Domain Users.  After doing 
this, all my user home directories were created on 1st login.


Good luck,
Dale

M Azer wrote:
now that all permissions are right - 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/pam_mkhomedir.so 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

___ 



I removed the valid users = %S and it worked -  Thanks for you help


On 1/15/07, M Azer [EMAIL PROTECTED]  wrote:Hello all,

I am running samba-3.0.23c-2 on Redhat 3 enterprise as ADS. I am able 
to see

the windows users and groups with wbinfo.

[EMAIL PROTECTED] /]# getent passwd windowuser
windowuser:*:1:10002:windowuser:/home/CAD/windowuser:/bin/bash

when i log to the network with one of the xp client machine i see home 
share
as well as a public share but i get access denied to both even after 
giving

the public share chmod 777 to everything on.

from the linux terminal i tried to:
[EMAIL PROTECTED] /]# smbclient //itbox/windowuser -U windowuser
Password:
session setup failed: NT_STATUS_UNEXPECTED_NETWORK_ERROR

the second time I ran the same command i got:

[EMAIL PROTECTED] /]# smbclient //itbox/windowuser -U windowuser
Password:
Domain=[CAD] OS=[Unix] Server=[Samba 3.0.23c-2]
tree connect failed: NT_STATUS_ACCESS_DENIED


all of my windows users are able to logon the linux termainl with their
windows username and password

[global]
#ADS
   security = ADS
   workgroup = CAD
   realm = CAD.TESTDOMAIN
   netbios name = itbox
   preferred master = no
   password server = 192.168.1.6
   client use spnego = yes
   server signing = auto
   encrypt passwords = yes
#winbind
   winbind separator = +
   idmap uid = 1000-2
   idmap gid = 1000-2
   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
#logs
   log file = /var/log/samba/%m.log
   log level = 3
   max log size= 50
#extras
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   hosts allow = 192.168.1. 192.168.0. 127.
[homes]
   comment = Home Directories
   valid users = %S
   read only = No
   browseable = No
[data]
   path = /data
   public = yes
   writable = yes
   browseable = yes

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Auto Create user home directory

2007-01-15 Thread Jason Haar
Dale Schroeder wrote:
 I see you have template homedir = /home/%D/%U.  Did you create the
 directory /home/CAD?  It is not created automatically, and that is one
 thing that seems to be left out of the how-to's.  I set the directory
 permissions to 770, owned by root*:*DOMAIN+Domain Users.  After
 doing this, all my user home directories were created on 1st login.
I think that should be reported as a bug. As %D is dynamic and may
change with time (as new domains are added to an existing site),
expecting it to be manually created beforehand is a bit odd. If %U can
be created on the fly - why not anything else?

-- 
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Auto Create user home directory

2007-01-15 Thread M Azer

I have created the Domain folder CAD where all the users home should be
created under. however I still can't create a new  user in win 2003 AD and
have the home folder be created automatically - I still have to create the
home folder first then create the user. does it have anything to do with
pam.d directory? any modification need to be done there?

On 1/15/07, Jason Haar [EMAIL PROTECTED] wrote:


Dale Schroeder wrote:
 I see you have template homedir = /home/%D/%U.  Did you create the
 directory /home/CAD?  It is not created automatically, and that is one
 thing that seems to be left out of the how-to's.  I set the directory
 permissions to 770, owned by root*:*DOMAIN+Domain Users.  After
 doing this, all my user home directories were created on 1st login.
I think that should be reported as a bug. As %D is dynamic and may
change with time (as new domains are added to an existing site),
expecting it to be manually created beforehand is a bit odd. If %U can
be created on the fly - why not anything else?

--
Cheers

Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Auto Create user home directory

2007-01-15 Thread Ed Plese
On Mon, Jan 15, 2007 at 12:11:29PM -0500, M Azer wrote:
 now that all permissions are right - 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/pam_mkhomedir.so 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.

You might try adding the following to your smb.conf file:

[global]
  obey pam restrictions = yes


Ed Plese
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba