Koozali.org: home of the SME Server

Loginscript Help

Ray Mitchell

Re: Loginscript Help
« Reply #15 on: March 17, 2002, 04:36:48 PM »
If you don't want to use roaming profiles then don't set up Profiles on your Windows workstation. But you do need to enable the roaming profiles setting in sme to get netlogon.bat to work.

I do not have profiles set on my Win 95/98 & 2000 workstations and as mentioned before netlogon.bat works OK and sets up drives, maps home folder, printers, & sets time, without using any other script tools etc
Regards
Ray Mitchell

Devlyn Davis

Re: Loginscript Help
« Reply #16 on: March 17, 2002, 10:14:27 PM »
Ray Mitchell wrote:
>
> If you don't want to use roaming profiles then don't set up
> Profiles on your Windows workstation. But you do need to
> enable the roaming profiles setting in sme to get
> netlogon.bat to work.

I'm not sure that's entirely accurate.  I used Tibor's template fragment as noted above and I do not need to enable roaming profiles (at least I do not think this is the same as roaming profiles, certainly I did not enable roaming profiles from the admin page) to make the home drives work.  As a reminder here is the fragment:

{
# users logon home path
# %L substitutes for this logon servers name
# %U is username

return "" unless ($SambaDomainMaster eq "yes");

"logon home = \%L\%U\._winprofiles";

}

>
> I do not have profiles set on my Win 95/98 & 2000
> workstations and as mentioned before netlogon.bat works OK
> and sets up drives, maps home folder, printers, & sets time,
> without using any other script tools etc
> Regards
> Ray Mitchell

Using the above fragment, I was able to get netlogon.bat to work correctly with home drives (it even worked for mapping other drives and printers before I applied the fragment, just not home drives.)  However, I was not able to figure out how to map drives based on group membership.  With the two utilities I listed above, I am able to map drives based on group membership.  Do you have another way around this?

Thanks,
-Dev

Ben Morrisson

Re: Loginscript Help
« Reply #17 on: March 18, 2002, 05:21:44 AM »
if you don't want to use roaming profiles try this:

net use H: \[servername]\%username%

this presumes the SME account is the same you use for login to your machine
makes use of windows environment variable which seems logical as this is usually
the account/home drive you are after.

works with all versions

cheers.
Ben

Devlyn Davis

Re: Loginscript Help
« Reply #18 on: March 18, 2002, 06:59:34 AM »
Ben Morrisson wrote:
>
> if you don't want to use roaming profiles try this:
>
> net use H: \[servername]\%username%
>
> this presumes the SME account is the same you use for login
> to your machine
> makes use of windows environment variable which seems logical
> as this is usually
> the account/home drive you are after.
>
> works with all versions

Ok, that seems to work well and is much simpler than applying a custom fragment.  I'm sold.  Now, as far as mapping drives based on group membership, is there a more elegant or simpler method than the one I listed above?

Thanks for the great tips!
-Dev

Devlyn Davis

Re: Loginscript Help
« Reply #19 on: March 18, 2002, 10:45:36 PM »
Ben Morrisson wrote:
>
> if you don't want to use roaming profiles try this:
>
> net use H: \[servername]\%username%

I hate to keep beating this dead horse, but I'm having a problem with the above tip.  It works great in Windows 2000, but not in Windows 98.  I am back to using the fragment that tibor posted, which as been the most stable (non-roaming profile) setting across the different flavors of Windows.

Richard Emory

Re: Loginscript Help
« Reply #20 on: March 22, 2002, 10:42:41 PM »
This is what I used on a clients mixed 9X/2000/XP network.
Basically it works like this.  Filter the users out first, apply personal settings then jump to the group tag and do additional settings.

Hope this helps.
Richard Emory

@REM To set the time when clients logon to the domain:
@net time \limelight /set /yes

@rem Get which machine is logging on
@ECHO OFF
NET CONFIG | find "Computer">%TEMP%.\GETDATA.BAT
ECHO.e100'SET               COMPUTERNAME='>%TEMP%.\SCR
FOR %%C IN (w q) DO ECHO.%%C>>%TEMP%.\SCR
debug %TEMP%.\GETDATA.BAT<%TEMP%.\SCR>NUL
CALL %TEMP%.\GETDATA.BAT
deltree /y %TEMP%.\SCR %TEMP%.\GETDATA.BAT>NUL

@rem Get who is logging on
NET CONFIG | find "User">%TEMP%.\GETDATA.BAT
ECHO.e100'SET                   USERNAME='>%TEMP%.\SCR
FOR %%C IN (w q) DO ECHO.%%C>>%TEMP%.\SCR
debug %TEMP%.\GETDATA.BAT<%TEMP%.\SCR>NUL
CALL %TEMP%.\GETDATA.BAT
deltree /y %TEMP%.\SCR %TEMP%.\GETDATA.BAT>NUL

@rem Debug statements
@rem ECHO. Computer name is %COMPUTERNAME%
@rem ECHO. User name is %USERNAME%

@rem Decision tree on who is logging in
if "ADMIN"=="%USERNAME%" GOTO admin
if "ART"=="%USERNAME%" GOTO art
if "AYANNA"=="%USERNAME%" GOTO ayanna
if "BILL"=="%USERNAME%" GOTO bill
if "BRIDGETTE"=="%USERNAME%" GOTO bridgette
if "JACK"=="%USERNAME%" GOTO jack
if "JASON"=="%USERNAME%" GOTO jason
if "JREJR"=="%USERNAME%" GOTO jrejr
if "LARISA"=="%USERNAME%" GOTO larisa
if "NATHAN"=="%USERNAME%" GOTO nathan
if "PIERCE"=="%USERNAME%" GOTO pierce
if "USER"=="%USERNAME%" GOTO user

@rem Personalized settings
:admin
net use e: \lserv\netlogon
GOTO manager

:art
net use e: \lserv\art
GOTO eng

:ayanna
net use e: \lserv\ayanna
GOTO adm

:bill
net use e: \lserv\bill
GOTO cad

:bridgette
net use e: \lserv\bridgette
GOTO cad

:jack
net use e: \lserv\jack
GOTO adm

:jrejr
net use e: \lserv\jrejr
GOTO cad

:larisa
net use e: \lserv\larisa
GOTO cad

:nathan
net use e: \lserv\nathan
GOTO cad

:pierce
net use e: \lserv\pierce
GOTO cad

:user
net use e: \lserv\user
GOTO adm

:adm
net use f: \lserv\adminfiles
net use g: \lserv\confidential
net use h: \lserv\supervisor
if "JACK"=="%USERNAME%" GOTO eng
if "USER"=="%USERNAME%" GOTO eng
GOTO all

:eng
net use j: \lserv\engfiles
if "USER"=="%USERNAME%" GOTO cad
GOTO all

:cad
net use l: \lserv\dwg
net use u: \lserv\u-acad
net use s: \lserv\arch
GOTO all

:all
set USERNAME=
set COMPUTERNAME=
net use m: \lserv\netshare