[Samba] net drive mapping not working in login script

Craig White craigwhite at azapple.com
Fri Apr 7 15:22:56 GMT 2006


OK then, if the user can execute the script out of netlogon and the
system is joined to the domain, then I would suggest that you comment
out the the 'login scipt' (note misspelling) in smb.conf and then see if
the script is automatically run (the one called for by your pdbedit
entry).

I don't know if having the script named starting with a '.' would make a
difference either.

Also as a note, I don't reference the path for a login script, but
rather the login script name itself as it is assumed to be in the
'netlogon' share of the server providing logon services.

i.e. 'logon.bat' and not '\\server\netlogon\logon.bat'

I am not stating these things to be empiricallly correct, but rather as
this works for me.

Craig

On Fri, 2006-04-07 at 16:03 +0100, Chris Boyd wrote:
> The machine (rds7) is showing up as a domain member and the scripts do work under the users. 
> 
> smbclient -L ucd01:
> 
> Sharename       Type      Comment
>         ---------       ----      -------
>         protel          Disk      Protel Data Folder
>         share           Disk      Shared Folder
>         profiles        Disk      Network Profiles Service
>         users           Disk      All users
>         groups          Disk      All groups
>         print$          Disk      Printer Drivers
>         IPC$            IPC       IPC Service (Samba 3.0.20-4-SUSE)
>         ADMIN$          IPC       IPC Service (Samba 3.0.20-4-SUSE)
>         root            Disk      Home Directories
> Domain=[UCD] OS=[Unix] Server=[Samba 3.0.20-4-SUSE]
> 
>         Server               Comment
>         ---------            -------
>         RDS7
>         UCD01                Samba 3.0.20-4-SUSE
> 
>         Workgroup            Master
>         ---------            -------
>         UCD                  UCD01
> 
> 
> 
> >before you worry about scripts running automatically, you should
> >confirm...
> 
> >1 - that the scripts work if you can run them from the XP system
> >manually as that user
> 
> >2 - that the machines have been 'joined' to the domain as that is >the
> >only way automatic scripts in netlogon will run
> 
> Craig
> 
> 
> Chris Boyd
> Systems Engineer
> USIT 
> 19-21 Aston Quay
> Dublin 2
> Ireland
> 
> Tel: +353 1 6021670
> Fax: +353 1 6771602
> www.usit.ie
> >>> Ed Kasky <ed at esson.net> 04/07/06 2:56 PM >>>
> I have the following config that works well for me:
> 
> logon script = %u.bat
> 
> and under /shared/netlogon I have [user].bat for each user as we are 
> a small operation...
> 
> HTH
> 
> Ed
> 
> At 06:24 AM Friday, 4/7/2006, EHines wrote -=>
> >I'm shotgunning here, since I'm not much more experienced than you, 
> >but I think setting login script to netlogon/%U.bat makes Geraldine, 
> >for instance, run the script geraldine.bat.bat.  Try using 
> >netlogon/%U (although I'm not sure this construction works).
> >
> >Eric Hines
> >
> >Chris Boyd wrote:
> >>No they are in the /var/lib/samba/netlogon/ directory...see
> >>ls -la /var/lib/samba/netlogon/
> >>total 21
> >>drwxr-xr-x  2 root root 200 Apr  7 14:20 .
> >>drwxr-xr-x  6 root root 680 Apr  7 14:15 ..
> >>-rwxr-xr-x  1 root root 179 Apr  7 12:10 aillin.bat
> >>-rwxr--r--  1 root root 179 Apr  7 12:10 geraldine.bat
> >>-rwxr--r--  1 root root 179 Apr  7 12:10 kay.bat
> >>-rwxr--r--  1 root root 179 Apr  7 12:10 reception.bat
> >>-rwxr-xr-x  1 root root 181 Apr  7 12:09 robin.bat
> >>
> >>I've tried chmod 755, changing the {netlogon} in smb.conf:
> >>
> >>[netlogon]
> >>         comment = Network Logon Service
> >>         path = /var/lib/samba/netlogon
> >>         login scipt = netlogon/%U.bat
> >>         write list = root
> >>         admin users = root
> >>         guest ok = Yes
> >>         browseable = No
> >>
> >>doesn't work for some reason.
> >>
> >>
> >>
> >>Chris Boyd
> >>Systems Engineer
> >>USIT 19-21 Aston Quay
> >>Dublin 2
> >>Ireland
> >>
> >>Tel: +353 1 6021670
> >>Fax: +353 1 6771602
> >>www.usit.ie
> >>
> >>>>>E <eehines at comcast.net> 04/07/06 2:00 PM >>>
> >>>>>
> >>You haven't placed your scripts in the .../netlogon directory; 
> >>you've placed them, it seems from your ls listing, in your 
> >>.../netlogon/scripts directory.  You need to correct your [netlogon] path.
> >>
> >>Eric Hines
> >>
> >>Chris Boyd wrote:
> >>
> >>>To answer craig. I've corrected the dos syntax in the login 
> >>>scripts but they don't seem to be running.
> >>>Here's the whole smb.conf
> >>>
> >><snip>
> >>
> >>
> >>>[netlogon]
> >>>         comment = Network Logon Service
> >>>         path = /var/lib/samba/netlogon
> >>>         write list = root
> >>>         admin users = root
> >>>         guest ok = Yes
> >>>         browseable = No
> >>>
> >>>
> >>>ls -la /var/lib/samba/netlogon/
> >>>total 21
> >>>drwxr-xr-x  3 root root 224 Apr  7 12:13 .
> >>>drwxr-xr-x  6 root root 680 Apr  7 12:16 ..
> >>>-rwxr--r--  1 root root 179 Apr  7 12:10 aillin.bat
> >>>-rwxr--r--  1 root root 179 Apr  7 12:10 geraldine.bat
> >>>-rwxr--r--  1 root root 179 Apr  7 12:10 kay.bat
> >>>-rwxr--r--  1 root root 179 Apr  7 12:10 reception.bat
> >>>-rwxr--r--  1 root root 181 Apr  7 12:09 robin.bat
> >>>drwxr-xr-x  2 root root  80 Apr  6 12:05 scripts
> >>>
> >>>
> >>>Chris Boyd
> >>>Systems Engineer
> >>>USIT 19-21 Aston Quay
> >>>Dublin 2
> >>>Ireland
> >>>
> >>>Tel: +353 1 6021670
> >>>Fax: +353 1 6771602
> >>>www.usit.ie
> >>>
> >>>
> >><snip>
> >>
> >>
> >
> >--
> >The mode in which the inevitable comes to pass is through effort.
> >         --Justice Oliver Wendell Holmes, Jr
> >
> >--
> >To unsubscribe from this list go to the following URL and read the
> >instructions:  https://lists.samba.org/mailman/listinfo/samba
> 
> . . . . . . . . . . . . . . . . . .
> Randomly Generated Quote (758 of 1045):
> Often things ARE as bad as they seem!
> 
> 
> 
> -----------------------------------------------------------------
> This email message is intended only for the addressee(s) 
> and contains information that may be confidential and/or 
> copyrighted.  If you are not the intended recipient please 
> notify the sender by reply email and immediately delete 
> this email. Use, disclosure or reproduction of this email 
> by anyone other than the intended recipient(s) is strictly 
> prohibited. USIT has scanned this email for viruses and 
> dangerous content and believes it to be clean. However, 
> virus scanning is ultimately the responsibility of the recipient.
> -----------------------------------------------------------------
> 



More information about the samba mailing list