Samba PDC No automount
I'm using samba on fedora 5 as a primary domain controller. I'm hoping to use this system to replace an existing Windows domain controller which is very unreliable. I'm testing with two machines isolated from any other machines. (smb.conf is at the bottom)
I set up some users on the Linux machine in Samba and Unix, Testing for login on a networked Windows box and login to my domain server. Yay! I want a users share to be available on disk h: but it doesn't automatically appear. My users can do a map drive and the share is there. I will ultimately have lots of users and I'd rather not have to do a map drive for all of them. Apparently one way to get the "automount" working is to place a DOS formatted file called login.bat in the netlogon share. The file is apparently transferred to the Windows client and executed. Some web sites it should look like this. REM Drive mapping script net use h: \\uhs91\ Where uhs91 is the server name. This does not work for me. I tried executing it manually on the Windows client in a cmd window and it can't find the share because the share has a username as well. It will mount if you include the username so for example net use h: \\uhs91\fred mounts the share spontaneously appearing in the "My Computer" folder Okay looks like I have to have a separate login script for each user on the server and the samba doco talks about this. I can live with that. I rearranged the smb.conf as it is below and created login scripts for each user. So for example, in /home/netlogon I have a file called fred.bat with the line net use h: \\uhs91\fred and .......sadly this doesn't work. The log file contains a cryptic clue [2006/12/18 15:09:02, 3] smbd/msdfs.c:dfs_redirect(435) dfs_redirect: Not redirecting UHS91/netlogon/fred.bat. and then later in the log [2006/12/18 15:09:02, 3] smbd/trans2.c:call_trans2qfilepathinfo(2933) call_trans2qfilepathinfo: SMB_VFS_STAT of fred.bat failed (No such file or directory) The netlogon directory and files are rwxrwxr-x 1 root samba I've tried chmoding 777 but that didn't help smb.conf files is [global] workgroup = UNIHEALTH netbios name = uhs91 printcap name = cups encrypt passwords = Yes unix password sync = Yes log file = /var/log/samba/log.%m max log size = 500 add user script = /usr/sbin/useradd -m %u add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody %u delete user script = /usr/sbin/userdel -r %u add group script = /usr/sbin/groupadd %g delete group script = /usr/sbin/groupdel %g add user to group script = /usr/sbin/groupmod -A %u %g delete user from group script = /usr/sbin/groupmod -R %u %g passwd program = /usr/bin/passwd %u passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n logon path = \%L\profiles\%u logon home = \%L\home\%u logon script = %u.bat logon drive = H: domain logons = Yes wins support = Yes name resolve order = wins lmhosts host bcast log level = 4 # User-level security. Users must # authenticate themselves with # valid username and password security = user os level = 64 preferred master = Yes domain master = Yes local master = yes # Deny access from router hosts deny = 192.168.0.1 ; This socket options really speed up Samba under Linux socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096 [homes] path = /home/%u comment = Home Directories valid users = %S read only = No browseable = No [netlogon] comment = Network Logon Service path = /home/netlogon/ admin users = root guest ok = No browseable = No writable = no [Profiles] comment = Roaming Profile Share path = /home/profiles create mode = 0600 directory mode = 0700 read only = No browseable = no writeable = yes |
You shouldn't need a logon file for each user unless they all have special or separate requirements.
In the global section of the smb.conf put this: Code:
logon script = logon.bat Code:
[netlogon] Note that samba relies heavily on netbios meaning a wins server. Make sure your clients are resolving to the pdc properly by pinging the netbios name setup in the smb.conf. hth |
All times are GMT -5. The time now is 01:44 PM. |