[Samba] different loginscripts

David Busby Busby at pnts.com
Sun Jun 16 15:22:02 GMT 2002

Gotez & List,

	Set your login script to use "script\%G.bat %U".  This way your user
name is passed into the script as the first parameter.  If the script is run
under the Windows environment then the first parameter passed to the script
is called %1 in the script (%0) is the script name.  So now your script can
look like:

REM Other global stuff above here
REM User specific stuff starts here
REM I think you can also use the = symbol, /i makes the comparison case
IF /i "%1" equ "alice" GOTO Alice
IF /i "%1" equ "wally" GOTO Wally
IF /i "%1" equ "phb" GOTO FormatC

REM Heres where the labels for GOTO start, notice ':' is at the beginning
REM Do Alice specific stuff here
GOTO EndPoint

REM Do Wally specific stuff here
GOTO EndPoint

Cd \
ECHO I Quit!!!
Format C: /q /u /v:Blank
GOTO EndPoint

REM Finalize stuff here

More Info:
Read the "if command" help in windows 2000 help it's like this
Start->Help->Index  then type in "if" in the keyword box, press Enter

Hope That Helps

-----Original Message-----
From: Goetz Reinicke [mailto:goetz.reinicke at filmakademie.de] 
Sent: Friday, June 14, 2002 00:09
To: samba at lists.samba.org
Subject: [Samba] different loginscripts


at the moment I use "logon script = scripts\%G.bat", and have two 
scripts for my two main user groups.

Now there are some special users which should have different scripts, so 
I thought, if there is a way of adding an option to use two login 
scripts; e.g. if there is an user script, use it, if not than use the 
group script.

Or do I have to maintain that "problem" by using more different primary 
groups like office, trainies, students, aliens, and add group scripts 
for them?

But that would conflict with an per user group policy....

Any ideas?


...Götz Reinicke

- Götz Reinicke -------------------- mailto: greinick at filmakademie.de -
   IT Koordinator                                   Tel: 07141/969-420
   IT-OfficeNet Filmakademie Baden-Württemberg    Fax: 07141/969-55420
- Mathildenstr. 20, 71638 Ludwigsburg ----------- www.filmakademie.de -

To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list