Hi Guys, Advise, I have 200 users, they all have access to 20 shares in different combinations. They all have their own netlogon scripts... its a management nightmare, is there a way to create a universal netlogon script that I can include all the shares to mount and it will silently fail on the ones it cant? Perhaps there is a smarter way to implement this idea, lynching is welcome, so is advice. Brad
i suggest go use kixscript here is a small example. connecting printers If INGROUP ("dwangb_pr") = 1 ## if member of dwangb_pr CONNECTPRINTER("PDC","rol") ## connect printer rol from server PDC If INGROUP ("dwangb_pr_def") = 1 ## if member of dwangb_pr_def, SETDEFAULTPRINTER ("\\PDC\rol") ## set printer default Sleep 0.50 EndIf EndIf you can do the same with groups and drive mappings. the only thing is you get a lot of groups. if you need a full copy of my kix script say so and i'll email you one. Louis>-----Oorspronkelijk bericht----- >Van: samba-bounces+belle=bazuin.nl@lists.samba.org >[mailto:samba-bounces+belle=bazuin.nl@lists.samba.org] Namens Brad C >Verzonden: woensdag 3 september 2008 15:05 >Aan: samba@lists.samba.org >Onderwerp: [Samba] universal netlogon script > >Hi Guys, > >Advise, I have 200 users, they all have access to 20 shares in >different >combinations. They all have their own netlogon scripts... its >a management >nightmare, >is there a way to create a universal netlogon script that I >can include all >the shares to mount and it will silently fail on the ones it >cant? Perhaps >there is a smarter way to implement this idea, >lynching is welcome, so is advice. > >Brad >-- >To unsubscribe from this list go to the following URL and read the >instructions: https://lists.samba.org/mailman/listinfo/samba >
http://www.archivum.info/linux.samba/2008-06/msg00486.html http://lists.samba.org/archive/samba/2008-June/141457.html http://www.mail-archive.com/samba@lists.samba.org/msg91781.html Brad C wrote:> Hi Guys, > > Advise, I have 200 users, they all have access to 20 shares in different > combinations. They all have their own netlogon scripts... its a management > nightmare, > is there a way to create a universal netlogon script that I can include all > the shares to mount and it will silently fail on the ones it cant? Perhaps > there is a smarter way to implement this idea, > lynching is welcome, so is advice. > > Brad >
Brad C wrote:> Hi Guys, > > Advise, I have 200 users, they all have access to 20 shares in different > combinations. They all have their own netlogon scripts... its a management > nightmare, > is there a way to create a universal netlogon script that I can include all > the shares to mount and it will silently fail on the ones it cant? Perhaps > there is a smarter way to implement this idea, > lynching is welcome, so is advice. > > Brad >Hi Brad, we've been using KIXTART for about 8 years with 1000+ users and it just works without any problems. It's a good idea to start with one central logon script in the netlogon share, add the line logon script = kix32 my_logon_script.scr and - if it's more complex - call further scripts where you might differentiate between e.g. usernames (not that good, since they're changing) or groups (better, since they are more general). You might also use IF cases to e.g. sort according to the machine IPs, etc. So there are many options. Hope that helps, best Joachim
On 9/3/2008 9:04 AM, Brad C wrote:> Hi Guys, > > Advise, I have 200 users, they all have access to 20 shares in different > combinations. They all have their own netlogon scripts... its a management > nightmare, > is there a way to create a universal netlogon script that I can include all > the shares to mount and it will silently fail on the ones it cant? Perhaps > there is a smarter way to implement this idea,Here's mine (anonymized) - no error-checking is done, but its simple, and been working fine for many years: :begin echo off cls net time \\mypdc /set /y :: first unmap all possible mapped drives, then map all drives :: common to all users call \\mypdc\netlogon\unmap-all.bat call \\mypdc\netlogon\map-all.bat if %username% == user1 net use f: \\servername\share1 /persistent:no :: map drive for Group1 \\mypdc\netlogon\ismember "MyDomain\Group1" if errorlevel 1 net use j: \\mypdc\share2 /persistent:no :: map drives for Group2 \\mypdc\netlogon\ismember "MyDomain\Group2" if errorlevel 1 call \\mypdc\netlogon\group2.bat :: map drive for Group3 \\mypdc\netlogon\ismember "MyDomain\Group3" if errorlevel 1 net use q: \\servername\share3 /persistent:no :: map drive for Group4 \\mypdc\netlogon\ismember "MyDomain\Group4" if errorlevel 1 net use s: \\mypdc\share4 /persistent:no :end This script only requires that the ismember.exe executable be placed in the NETLOGON share. -- Best regards, Charles
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad C wrote:> Hi Guys, > > Advise, I have 200 users, they all have access to 20 shares in different > combinations. They all have their own netlogon scripts... its a management > nightmare, > is there a way to create a universal netlogon script that I can include all > the shares to mount and it will silently fail on the ones it cant? Perhaps > there is a smarter way to implement this idea, > lynching is welcome, so is advice.On our site, we use a perl script that outputs a batch file called <username>.bat. I believe we use a root preexec/postexec to run the perl script. Then the script is pointed at %U.bat. This was in the manual, last I checked, under a heading similar to "magic login script" or something like that. - -- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer II |$&| |__| | | |__/ | \| _| |novosirj@umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIvrPEmb+gadEcsb4RAs8pAJ42CdBaLOHv5SYDQqXC/P7lWF5oXgCgzu6B +oJN1fTEzH/6kHs02XPJc1o=fYBH -----END PGP SIGNATURE-----