Login Script for Windows XP Users

Hi
I have numerous XServes with both Mac and Win XP clients connecting to them with no problems. Currently, my Win XP users connect to the servers, choose a share point and then Map the share point to say, Drive Z:, they choose reconnect at login and this (seems) to work 99% of the time. However, now and then they start up their machines, navigate to the network drive in 'My Computer', open up the drive and get an 'Access Denied' Message. Now, I can resolve this for the users by disconnecting the drive and re-mapping the drive and away we go again, all is well.
However, at a recent meeting, I overheard a discussion of the use of 'Login Scripts' to automatically connect to a share point on a Mac OSX Server and connect that share point as say, Drive G: automatically. This apparently, doesn't require the drive to be mapped and happens when the user turns on their computer.
Does anyone know how to do this? If, so would somebody be prepared to give me a step by step guide?
Thanks in advance

Posted on Jul 29, 2005 3:49 PM

Reply
4 replies

Aug 9, 2005 10:19 AM in response to Paul Downey1

I would like to get login scripts working as well. I have done some reseach and fould several things out, but I confused where to put them on the server.

********************
Apples' directions where to place login scripts.

Step 5: Transfer login scripts to Mac OS X Server
1 Copy login scripts from the Windows server to /etc/netlogon/ on Mac OS X Server.
2 In Workgroup Manager, select each Windows PDC user and make sure that the location of the login script is correctly specified. The Login Script field should contain the relative path to a login script located in /etc/logon/. For example, if you’ve copied a script named setup.bat into /etc/logon/, the Login Script field should contain setup.bat.
******************

This is confusing because it tells you two different locations. 1. /etc/netlogin/ 2. /etc/logon. Neither one existes on the server. Which one is correct?
Now to confuse things even more, I found some info with O'Reillys'

*****************
O'reillys' directions where to put the login scripts.

Each logon script should be stored at the base of the [netlogon] share. For example, if the base of the [netlogon] share is /export/samba/logon and the logon script is jeff.bat, the file should be located at /export/samba/logon/jeff.bat. When a user logs on to a domain that contains a startup script, he or she will see a small dialog that informs them that the script is executing, as well as any output the script generates in an MS-DOS-like box.
******************

If this is correct, then I it sounds like they should be placed in the /user/profiles/ directory.

Here is an example of my script...

NET TIME \\PANTHER /set /yes
NET USE H: /home
NET USE P: \\PANTHER\PC

Can anybody help clairify this?
Thanks in advance!

Nov 6, 2005 5:37 AM in response to Axsimulate

I have a script in /etc/netlogon called student.bat and I have configured a test user to call this by setting the Login Script in Workgroup Manager to "student.bat".

However, it doesnt seem to be working. In fact, nothing happens, anywhere. I can't find any reference to it trying to call student.bat in any log file. This is a very simple script that just connects P: to the profiles directory.

Any clues as to what I'm doing wrong?

Nov 6, 2005 5:40 AM in response to Corrado

Oh, one more thing. I am getting the following error in my log.smbd file:

[2005/11/06 03:37:48, 0] /SourceCache/samba/samba-92.13/samba/source/smbd/service.c:set currentservice(51)
chdir (/etc/netlogon) failed

Does this help? To me it looks like Samba is having a hard time openeing the netlogon directory, but that directory does exist and it is marked 770 (see below).

xserve1:/etc/netlogon root# ls -ld /etc/netlogon
drwxrwx--- 3 root staff 102 Nov 6 03:34 /etc/netlogon

Dec 13, 2005 8:58 PM in response to Paul Downey1

In response to getting windows clients to logon using a script to mount a drive letter volume.

I got WIndows XP users to log in, get their home folder AND mount separate folders (one with clip art and one with an application) using drive letters.

Step 1) Create your users in WGM. If you leave the windows tap empty, the windows clients log in and get the same home folder they would if they logged in using a mac. So that part is easy.

Step 2) In the window login scripts 'slot' in the users windows tab in WGM, put in the name of your script - mine was "students.bat"

3) Using a text editor ( I did it on a winxp machine just for insurance) I wrote a script - don't panic:

net use W: \\windows server name\folder name

Where windows server name is the name of your server (mine is lhs2)
Where folder name is the name of the foder you want to share (mine is netview).
You could do this for printers too - might have to substitute lpt1: for the drive letter though.

Be sure to share the folder on the windows server - using properties, share it and set the permissions to the users you want to have access.

The on the mac server, under the GO menu, connect to folder, type in /etc and then scroll down to the netlogon folder. Put the .bat file you created above in the netlogon folder.

It worked fine for me. This all assumes a clean install with 10.4
Your milage may vary.

an old G4 Sawtooth 400 Mac OS X (10.4.2)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Login Script for Windows XP Users

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.