Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-23-2009, 09:47 AM   #1
LQ Newbie
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Angry Samba PDC without roaming profiles - Vista login doesn´t run script!

Im trying to set up a samba PDC and login to it from Vista, and everything is fine except that the login script is not getting run at all.
I dont want roaming profiles, I just want a script to map the samba users drive and a couple of other network shares.

Pasting smb.conf at end of post. The logon script is in the netlogon directory and Im pretty sure all the permissions are ok.
This is a windows file.

Vista logs in ok as the domain user, just no script! Please help!
Thanks heaps!

    ; General server settings
    netbios name = TILVERTON  
    server string = %h server (Samba, Ubuntu)
    workgroup = ROBERTS
    announce version = 5.0

    passdb backend = tdbsam
    security = user
    username map = /etc/samba/smbusers
    name resolve order = wins bcast hosts

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes

    domain master = yes
    domain logons = yes
    local master = yes
    wins support = yes
    preferred master = yes
    os level = 65

# Useradd scripts
   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 -n -g machines -c Machine -d /var/lib/samba -s /bin/false %u

   idmap uid = 15000-20000
   idmap gid = 15000-20000

# sync smb passwords with linux passwords
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
   passwd chat debug = yes
   unix password sync = yes

# Default logon %U is user, %N is server name %L is netbios server name %a OSarch 
  logon script = logon.cmd
  logon drive =
  logon home = 
  logon path =

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
   comment = Home Directories
   browseable = no
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S

   comment = Network Logon Service
   path = /home/samba/netlogon

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
    path = /var/lib/samba/printers
    browseable = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

    path = /var/spool/samba
    printable = yes
    browseable = yes

    path = /media/samba/temp
    read only = no
    create mask = 0644
    directory mask = 0755
Old 06-23-2009, 09:50 AM   #2
LQ Newbie
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
same on XP client

I also get no script running on an XP box I just tried.
Old 06-23-2009, 12:09 PM   #3
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,402
Blog Entries: 1

Rep: Reputation: 64
Hi !

Please, check if all users have read and execute permissions on every path of "/home/samba/netlogon/logon.cmd".
You can test the execution on a windows machine by opening a and typying:
You can also browse or mount the netlogon share to a letter (N: or whatever) and trying to execute the file as if a regular program (default:double click).
Old 06-23-2009, 08:01 PM   #4
LQ Newbie
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Smile access granted!

Thanks heaps marozsas!!

I didn't have execute permissions on the netlogon directory at the group level.
I just ran
chmod 755 /home/samba/netlogon

and its all good.

Thanks so much!



logon, pdc, samba, script

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 PDC and roaming profiles Red Squirrel Linux - Networking 1 07-13-2005 08:09 PM
samba pdc roaming profiles help chm0d Linux - Networking 1 04-19-2005 02:24 AM
Samba as a PDC+ Roaming Profiles... tarballed Linux - Networking 22 08-12-2004 07:19 AM
samba pdc without roaming profiles 2 hsa Linux - General 4 05-13-2003 08:43 AM
samba pdc without roaming profiles hsa Linux - General 11 03-20-2003 03:05 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:17 PM.

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