[Samba] Multiple Login scripts
robert at schetterer.org
Wed Nov 16 08:06:09 GMT 2005
Julian Pilfold-Bagwell schrieb:
>Just a quick question about login scripts for a large number of users who
>change rooms a lot.
>I have several rooms each with a printer, and nearly a thousand users divided
>into two main groups - pupils and teachers who change rooms on a routine
>basis. Is it possible to set up multiple login scripts that would be executed
>in sequence i.e. run by user is %u, and machine is %m is it possible to say
>run %u to set up shares followed by %m to set up the right printers for the
>room their in?
>Thanks in advance...
jep it can be done , use ifmember.exe from the resource kit,
and install printers by group membership
ifmember /v /l "YOURDOMAINNAME\teachers"
if errorlevel 1 call teachers.bat
REM install the pdfwriter
rundll32 printui.dll,PrintUIEntry /dn /n "\\pdc\pdfwriter" /q
rundll32 printui.dll,PrintUIEntry /in /n "\\pdc\pdfwriter"
REM install Lexmark t630 Laserprinter
rundll32 printui.dll,PrintUIEntry /dn /n "\\pdc\lext630" /q
rundll32 printui.dll,PrintUIEntry /in /n "\\pdc\lext630"
this works if you install the printer drivers on samba, how to in smb faqs
you can do any jobs by having a default login.bat for every domain user
to others bats by lead from ifmember.exe
so there are many combinations thinkable
More information about the samba