Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Problem executing netlogon script in samba


    I am new here and I have configured samba on ubuntu 8.04-AMD64. The winxp client can join the domain without any problems, see the server in network connections. I am able manually map network drives from the WinXP client machine, but is not able to execute the netlogon script automatically when the user logs in. Below is the complete smb.conf file. My requirement is, users using winXP should be able to login to the domain and connect to their home directory to store all their files.

    I also figured out pdbedit command and an option -S to add the logon script in for a user. But, even after adding the logon script for the user, the logon script doesn't seem to work at all. the command is:

    pdbedit -u username -S "\\\\servername\\netlogon\\scripts\\logon.bat"

    When the users login, they should be able to map their respective home directories as a network mapped drive!

    Can anyone help me?

    # Global parameters
    workgroup = abc
    netbios name = servername
    ;interfaces = eth1, lo
    ;bind interfaces only = Yes
    passdb backend = tdbsam

    hosts allow =
    security = domain
    smb ports = 139
    add user script = /usr/sbin/useradd -m '%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/usermod -G '%g' '%u'
    add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody '%u'

    comment = User Home Dir
    path = /export
    read only = No

    ;shutdown script = /var/lib/samba/scripts/
    ;abort shutdown script = /sbin/shutdown -c
    domain logons = Yes
    preferred master = Yes
    domain master = yes
    wins support = Yes
    os level = 65
    logon path = \\%N\profiles\%U
    logon drive = h:
    logon home = \\%N\%U

    ;comment = Home Directories
    ;valid users = %S
    ;read only = No
    ;browseable = No

    comment = Network Logon Service
    path = /var/lib/samba/netlogon
    logon script = /var/lib/samba/netlogon/logon.bat
    guest ok = Yes
    locking = No
    read only = no

    comment = Profile Share
    path = /var/lib/samba/profiles
    read only = No
    profile acls = Yes

    username map = /etc/samba/smbusers
    log level = 1
    syslog = 0
    log file = /var/log/samba/%m
    max log size = 50
    smb ports = 139
    name resolve order = wins bcast hosts
    time server = Yes
    printcap name = CUPS
    show add printer wizard = No
    shutdown script = /var/lib/samba/scripts/
    abort shutdown script = /sbin/shutdown -c
    utmp = Yes
    map acl inherit = Yes
    printing = cups
    veto files = /*.eml/*.nws/*.{*}/
    veto oplock files = /*.doc/*.xls/*.mdb/

  2. #2
    Is there anyone who has made this work?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts