[Samba] netlogin scripts

Hamish lists at subvs.co.uk
Wed Dec 1 14:26:27 GMT 2004


>
>3.  Does anyone have a good example of a "netlogin" script to simply map drives,
>that I could  see?
>
Give kixtart a try, it is very flexible, and easy for mapping drives etc
http://www.kixtart.org/
You will also find a big selection of demo scripts to hack for your own 
pleasure.

Here is the section of our kixtart script that maps drives (it is called 
from a .bat file like "kix32 kixscript.kix"):

    Use S: /Delete
    Use S: "\\server\shared"  /user:fred /Password:fred         
If @ERROR = 0
   ?  "S: mapped"
Else
   ?  "S: not mapped"
EndIf
  
       Use K: /Delete
       Use K: "\\anotherserver\general"
If @ERROR = 0
   ?  "K: mapped"
Else
   ?  "K: not mapped"
EndIf
  
       Use T: /Delete
       Use T: "\\anotherserver\DataBase"
If @ERROR = 0
   ?  "T: mapped"
Else
   ?  "T: not mapped"
EndIf

       Use V: /Delete
       Use V: "\\anotherserver\@USERID"
If @ERROR = 0
   ?  "V: mapped"
Else
   ?  "V: not mapped"
EndIf
  
       Use Z: /Delete
       Use Z: "\\anotherserver\fred"
If @ERROR = 0
   ?  "Z: mapped"
Else
   ?  "Z: not mapped"  
EndIf


More information about the samba mailing list