Page 1 of 1 1
Topic Options
#6634 - 2001-02-01 10:47 AM @userID mapping problem
Anonymous
Unregistered


We have recently moved over to NT4 from Novell, and have managed to re-create all of our group and personal share schemes we had in Novell.

However we need to map a directory for specific users. The directory will be different for each user so we cannot use a group mapping. We have also already used the home root path in the profile so cannot use that.

The script we are using is as follows:-

?@USERID

IF @USERID = "APerson"
shell "net use q: \\server\Share$\APerson"

endif

The mapping works if you type it in from the command prompt, and all of the permissions are OK.

We are using NT4SP6 servers and clients.

Any help with this problem would be gratefully appreciated.

Top
#6635 - 2001-02-01 11:00 AM Re: @userID mapping problem
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Ah, the old 'deep root mapping'.

This isn't a standard feature in NT.

As a workaround people use the SUBST command like this:

shell "%comspec% /c subst Q: \\server\Share$$\@USERID"

Kixtart sees a singe $ as the start of a variable. If you want to use a $ in a string you have to use a double $. (same goes for % and @)

You're lucky to have only WinNT4.0 workstations because this does not work on Win9x stations.

------------------
Greetz,

Roger the Young
------------------------
The code is out there...
------------------------

http://home.wanadoo.nl/r.s.m.s.dejong/Kixtart

------------------------

_________________________
The Code is out there

Top
#6636 - 2001-02-02 12:29 AM Re: @userID mapping problem
Anonymous
Unregistered



Thanks for that, however I think I misled slightly, as I don't want teh sharename necessarily to be the the username.

Ie there will be people sharing that directory who have different usernames e.g.:-

?@USERID

IF @USERID = "Aperson"
shell "net use q: \\Server\Share$\Folder"

endif

IF @USERID = "Aperson2"
shell "net use q: \\Server\Share$\Folder"

endif

So It wouldn't be a case of having the userid variable at the end of the share!

sorry for any confusion

Top
#6637 - 2001-02-02 12:37 AM Re: @userID mapping problem
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
no problem, just do:

if @USERID="aPerson"
shell "%comspec% /c subst Q: \\server\Share$$\folder"
endif

But I guess that you figured that out allready?

If you have many people that use the same share you could use the INGROUP function.

1. create a group (e.g. Thisgroup)
2. add the users, that should have this share, to this group.
3. assign the correct share & NTFS rights.

In the script you could use:

if INGROUP("Thisgroup")
shell "%comspec% /c subst Q: \\server\Share$$\folder"
endif

[This message has been edited by DrillSergeant (edited 01 February 2001).]

_________________________
The Code is out there

Top
#6638 - 2001-02-01 04:02 PM Re: @userID mapping problem
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Let me know if i under stand what you are trying to do....

each user had under Novell their own private Q drive? and you want to recreate this under NT?

Unfortunate NT4 clients can not do deep map routing like you could do in Novell. this means that a

net use q: \\server\share$\folder

will only map q: to \\server\share$

But since you are using NT you can use the subst command to map a drive!

subst q: \\server\share$\folder

(as a side note.... i could not get the subst command to work properly in win2k computers, but i will cover win2k computer in a moment!)

Win2k computers on the other hand are capable of deep map routing.

use q: "\\server\share$$\@usierid"

will work just fine on win2k computers.

So you code should look something like this.

code:

if @inwin = 2
select
case @dos = "5.0"
use q: "\\server\share$$\@userid"
case @dos = "4.0"
shell '%comspec% /c subst q: \\server\share$$\@userid'
endselect
endif

Bryce

Top
#6639 - 2001-02-01 04:06 PM Re: @userID mapping problem
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Sorry i was wrong! and way off topic.... (must read entire post)

Roger had the correct idea on this

Bryce

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1160 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.055 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org