-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have samba configured so that users have their own netlogon.bat file (e.g. %U.bat) and each user has a .bat with their username in the netlogon share. So far I have been unable to get any of the shares that I have defined in the batch file to be mounted when a user logs in. Here is a snapshot of both the netlogon section of my smb.conf file and the %U.bat file I am using: smb.conf: [global] ....... preexec = /usr/local/bin/netlogon %U logon script = %U.bat logon home = \\%L\%U\.profiles logon path = \\%L\profiles$\%U logon drive = Z: ........ [netlogon] path = /mnt/samba/netlogon admin users = root, Administrator, Admin valid users = %U read only = no browsable = no create mask = 0770 force create mode = 0060 create directory mask = 0770 force directory mode = 0070 security mask = 0777 directory security mask = 0777 %U.bat: @echo off REM # In this example it is assumed the smb.conf handles home drive mapping REM # All users get access to Common drive net use Y: \\192.168.155.20\common REM # Lastly lets set the davidc's time to 192.168.155.20's time net time \\192.168.155.20 /set /yes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkqNejQACgkQ5B+8XEnAvqvTiwCgjw5vNv34vE8m0dAIwUmbaw0Q Og8AnRKHI73Lo4T8Tasw6DHd6YPwwBOX =svIZ -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David Christensen wrote:> I have samba configured so that users have their own netlogon.bat file > (e.g. %U.bat) and each user has a .bat with their username in the > netlogon share. > > So far I have been unable to get any of the shares that I have defined > in the batch file to be mounted when a user logs in. Here is a snapshot > of both the netlogon section of my smb.conf file and the %U.bat file I > am using: > > smb.conf: > > [global] > ....... > preexec = /usr/local/bin/netlogon %U > logon script = %U.bat > logon home = \\%L\%U\.profiles > logon path = \\%L\profiles$\%U > logon drive = Z: > > ........ > > [netlogon] > path = /mnt/samba/netlogon > admin users = root, Administrator, Admin > valid users = %U > read only = no > browsable = no > create mask = 0770 > force create mode = 0060 > create directory mask = 0770 > force directory mode = 0070 > security mask = 0777 > directory security mask = 0777 > > %U.bat: > @echo off > REM # In this example it is assumed the smb.conf handles home drive mapping > REM # All users get access to Common drive > net use Y: \\192.168.155.20\common > > > REM # Lastly lets set the davidc's time to 192.168.155.20's time > net time \\192.168.155.20 /set /yesUpdated info The user can run the batch file manually from the netlogon share, so the issue seems to be with it running automatically, is there any logs that would capture an attempt to execute this file? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkqNhR4ACgkQ5B+8XEnAvquZCwCfcTAt+U42bdHe2B2+3MmmH/Lh W3YAn1r5esG75qWSOLrcoZseuHeuL1SJ =1Ir4 -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alex Crow wrote:> Depending on the version of Samba, it could be that "passdb expand > explicit = yes" is required. I ran across this in a similar situation > due to a change in default behaviour. > > AlexAlex, Thanks for the info, I will investigate this, I am currently using version 3.2.11. I am using ldap as my backend, is the passdb expand explicit parameter compatible with such a configuration? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkqNvAAACgkQ5B+8XEnAvqsBmQCeNTbL9EqYl3OKOwgIsZ6kzE2e R2sAn1OCHsuX7FWybexBMqihlkKGvNtb =iSNF -----END PGP SIGNATURE-----
Hi Guys, I have similar problem. I am following the instructions in http://www.samba.org/samba/docs/man/...#magicnetlogon to add domain users to the winxp clients Power Users group. Code: autopoweruser.sh #!/bin/bash /usr/bin/net rpc group addmem "Power Users" "DOMAIN_NAME\$1" \ -UAdministrator%secret -S $2 exit 0 [netlogon] comment = Netlogon Share path = /export/samba/logon root preexec = /etc/samba/scripts/autopoweruser.sh %U %m read only = Yes guest ok = Yes But, this is not working as the user is still not added to the Power Users group after login.. Can anybody help Avinash
Possibly Parallel Threads
- Script to Auto-add Domain Users to Workstation Power Users Group doesn't work
- using the bat script build_llvm_package.bat on windows
- Re: Executing bat file in Wine from bash shell
- Problem in executing java.exe within a bat file.
- GPL PV Drivers for Windows: install.bat problem