LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-17-2006, 10:23 PM   #1
keirvt
Member
 
Registered: Sep 2006
Location: Sydney Australia
Distribution: fedora/Ubuntu
Posts: 156

Rep: Reputation: 18
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
 
Old 12-19-2006, 05:28 PM   #2
xjlittle
Member
 
Registered: Aug 2003
Location: Indiana
Distribution: fc6 sles9 & 10 kubuntu ubuntu-server
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
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
Here is our samba pdc netlogon share:
Code:
[netlogon]
        comment = Network Logon Service
        path = /var/lib/samba/netlogon
        guest ok = Yes
        locking = No
In the netlogon folder shown above create a logon.bat file. You can call it whatever you want. Open up user manager and a test user. Open the profiles tab and type in logon.bat or whatever you named it. Close this and logon as the test user. The script should run.

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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
samba member server as fileserver authenticating samba PDC activeq Linux - Networking 0 11-17-2006 09:44 AM
samba 3 problem - samba PDC can not join to the domain ananthak Linux - Networking 1 05-21-2006 10:39 AM
Samba domain member server (DMS) group permissions in network with a Samba PDC srosa Linux - Networking 0 05-01-2006 05:55 PM
samba pdc citrus Linux - Networking 3 05-24-2004 01:19 AM
samba pdc HELP! freezer Linux - Networking 5 12-15-2003 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:42 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