Koozali.org: home of the SME Server

Loginscript Question/Help

Offline mjlyon

  • *
  • 17
  • +0/-0
Loginscript Question/Help
« on: June 04, 2009, 03:26:02 PM »
I am tring to get the loginscript package to work so I can have different groups map different drives.  I can manually map the drives when I log in, but they do not manually run.

My sample script is such:

@ECHO OFF
net use h: /home /persistent:no


Offline engdev

  • *
  • 71
  • +0/-0
Re: Loginscript Question/Help
« Reply #1 on: June 04, 2009, 04:32:52 PM »
Looks like you're trying to map your home drive to a drive letter? But there is an option at the bottom of the login script manager to map that automatically to whatever drive letter you like, so I don't think you need to do this?

This is a sample of my login script in case it helps:

Code: [Select]
echo Hello %USERNAME%, welcome to the network!
echo You are accessing the network from %COMPUTERNAME%
echo And you are running the %OS% os.
echo Please wait, authenticating %USERNAME% with the %LANGROUP% domain

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

#ifg cad_users
net use j: /del /yes >nul
net use j: \\Nas_engdev_01\Cadkey %PASSWORD% /USER:%USERNAME%
#endif

if exist Z: net use Z: /del /yes

#ifu supervisor
net use z: \\Nas_engdev_01\FILES %PASSWORD% /USER:%USERNAME%
#endif

This maps windows drive letters to connect to our existing NAS server according to the SME user group. The NAS box is configured with the same user name and pwd as the SME user.
Hope this helps. Rgds. John

Offline mjlyon

  • *
  • 17
  • +0/-0
Re: Loginscript Question/Help
« Reply #2 on: June 04, 2009, 04:45:17 PM »
Looks like you're trying to map your home drive to a drive letter? But there is an option at the bottom of the login script manager to map that automatically to whatever drive letter you like, so I don't think you need to do this?

This is a sample of my login script in case it helps:

Code: [Select]
echo Hello %USERNAME%, welcome to the network!
echo You are accessing the network from %COMPUTERNAME%
echo And you are running the %OS% os.
echo Please wait, authenticating %USERNAME% with the %LANGROUP% domain

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

#ifg cad_users
net use j: /del /yes >nul
net use j: \\Nas_engdev_01\Cadkey %PASSWORD% /USER:%USERNAME%
#endif

if exist Z: net use Z: /del /yes

#ifu supervisor
net use z: \\Nas_engdev_01\FILES %PASSWORD% /USER:%USERNAME%
#endif

This maps windows drive letters to connect to our existing NAS server according to the SME user group. The NAS box is configured with the same user name and pwd as the SME user.
Hope this helps. Rgds. John

What is your drive letter selected for home in the loginscript window for server-manager?

Thanks!

Offline engdev

  • *
  • 71
  • +0/-0
Re: Loginscript Question/Help
« Reply #3 on: June 04, 2009, 05:04:22 PM »
Ours is set to U: but that's only for consistency with previous NT server, so users have same drive letter. You should be able to set it to any unused drive letter, but you don't need to manually map it in the logon script.

FYI, we are using XP pro on the client machines.

Offline mjlyon

  • *
  • 17
  • +0/-0
Re: Loginscript Question/Help
« Reply #4 on: June 04, 2009, 06:18:26 PM »
We're also an XP shop.  I still cannot get the login script to run when a user logs in. 

Offline engdev

  • *
  • 71
  • +0/-0
Re: Loginscript Question/Help
« Reply #5 on: June 04, 2009, 06:34:21 PM »
There should be a netlogon.bat file created in the user's home directory. Can you see that file? In my case it is in the root of my U:\ drive. You shouldn't edit this file as it's what's created by the login script manager.

I assume that the login script saves correctly when you press the SAVE button?

Is this a new SME installation? Are you sure that the users are logging onto the domain correctly? I have occasional problems with users logging on wirelessly, where the wireless connection isn't made at the logon point, and this means that the logon script doesn't run. If the logon script runs, you will see a DOS window appear on the toolbar, if you maximise it in time, you can see the commands in the netlogon.bat batch file running.

Are you running XP Pro? as only Pro allows domain logon. XP Home doesn't, so batch file won't run.
« Last Edit: June 04, 2009, 06:43:54 PM by engdev »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Loginscript Question/Help
« Reply #6 on: June 04, 2009, 07:35:35 PM »
We're also an XP shop.  I still cannot get the login script to run when a user logs in. 

are they domain clients? I mean, did you join them to SME's domain?

Ciao
Stefano

Offline mjlyon

  • *
  • 17
  • +0/-0
Re: Loginscript Question/Help
« Reply #7 on: June 04, 2009, 07:37:22 PM »
Yes, they are joined to the domain and I can log on just fine.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Loginscript Question/Help
« Reply #8 on: June 04, 2009, 07:42:52 PM »
ok..

then check for errors in /var/log/messages

if you find something wrong, please raise a bug, thank you

Stefano

Offline jester

  • *
  • 496
  • +1/-0
Re: Loginscript Question/Help
« Reply #9 on: June 04, 2009, 08:11:21 PM »