Page 1 of 1 1
Topic Options
#3084 - 2000-05-23 01:43 PM Win95 "switch user"
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
Does anyone know of a command or command line tool that will perform a "switch user" function for Win9x clients? I am using the SUService (SU.EXE) in my login script with NT successfully but I need the same capabilities from my Win9x users.

Ultimately what I'm trying to accomplish is the automatic creation, sharing, permissions setting, and mapping of the user's Home drive from a kixtart login script. I've got the NT side no problem but can't seem to figure it out for Win9x. Am I S.O.L.?

------------------
Chris Fricke
Clackamas County

_________________________
Chris Fricke
Clackamas County

Top
#3085 - 2000-05-24 04:12 AM Re: Win95 "switch user"
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Chris,

no You're NOT!!!

i haven't never ever took a single thought
off switching 95' Users

I would strongly recommend not to use 9x Clients in Network environment unless the need of DirectX 7 is given to Client Server appz......

*Lol Jochen

P.S.: i never heard of a tool that does this task!!!But it would be interesting to know if someone took the tme to write one!

_________________________



Top
#3086 - 2000-05-24 10:32 AM Re: Win95 "switch user"
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
I saw this yesterday but I didn't respond because it was just too long to explain.

First, I think the differences between Win9x & NT preclude any such type of solution.

Second, I don't fully understand what you are trying to do. How can a user logon before they have an account. Do they log in as "guest" and then get led through a script to create an account? How does this work? As a LAN administrator, this seems too open to abuse for me. Do you really need this function?

Some of what you want to do can be done in Win9x. A script could be written that trapped logons to the guest account & evoked a script that led a user through creation of an account & a share. I do not know any Win9x replacements for XCALS or CALCS so the directory permissions could not be set. The impact of this I am not sure of. As to switching users afterwards I can come up with a reasonable proxy. There are a number of freeware utilities that allow you to re-log in to Win9x. The user would have to re-type in their userid & password but the system would not re-boot. It is rather quick, it only takes a few seconds. Anyway, at the end of your kix script poke this "logon.exe" into the runonce key in the register.

Also if you have a mixed win9x & NT client, you can not let the NT Server User Manager create the so-called shares for you. You must manually (or with a script) create the shares. How the NT user manager creates these so-called user shares is not compatible with Win9x & in my view is an abomination. The user manager does not really create a share. Instead it creates a directory under the globally shared directory "users" (or whatever you called the user directory) then it makes the "userid" the sole owner of this sub-directory. This directory is untouchable by the administrator or anyone else. You can not even look inside it. The only way for the administrator to access the directory is to take ownership, which "smashes" the so-called user share & makes it unusable by the user. You can not hide the sub-directory either. Why Microsoft choose this strategy instead of the one used by everyone else in the industry I do not know. My personal belief is that they choose this approach in an attempt to forces you to exclusively use NT workstation clients with NT server.


Jochen,

As to your comments about Win9x in a LAN environment, I do not agree. There are many things that can be done with Win9x that are difficult to do with NT. Of course, the opposite is also true. On balance I consider the 2 choices almost a saw-off. At least that is true in a school environment.

[This message has been edited by JackLothian (edited 24 May 2000).]

_________________________
Jack

Top
#3087 - 2000-05-25 12:01 AM Re: Win95 "switch user"
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
heres the scoop:

The goal is to avoid using User Manager to create the user directory and map the "home" drive. The reason is because Microsoft cannot do subroot mapping. As such the user's h: drive is "\\fileserver\usershare" and then they have to browse to their stuff(%username%). That sucks.

What I want is the home drive mapped directly to their stuff. Obviosly this means individual shares (hidden of course) for each user. I've got over 2000 users across 20 or so file servers and I am not about to create the shares manually.

Enter Kixtart:
What I've done is use kixtart to map the h:drive to "\\fileserver\userid$". If the share doesn't exist it maps h: to "\\fileserver\usershare", creates the "userid" subfolder, uses the SUService to share the folder as "userid$" and set permissions. It then uses the SUService again to set the local permissions. Finally it disconnects h: and reconnects h: to "\\filesvr\userid$".

This process works great under NT but I'd like to get the same functionality with Win9x clients.

So far I'm stumped...

------------------
Chris Fricke
Clackamas County

_________________________
Chris Fricke
Clackamas County

Top
#3088 - 2000-05-24 02:23 PM Re: Win95 "switch user"
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
I think this is best done from the server. First export the full list of users. For info on doing this I think both these sites give examples.

http://www.jsiinc.com/ http://www.ntfaq.com/

Next create a batch file something like this (I am making this up as I go so it might need debugging)

**********************************
mkdir [drive:]\USERS\%UserID%
XCACLS.EXE [drive:]\USERS\%UserID% /t /c /g administrator:fo;fo /y
RMTSHARE \\SERVER\%UserID%$=[drive:]\USERS\%UserID% /grant %UserID%:f users:2 /remark:%FullName%
RMTSHARE \\SERVER\%UserID%$ /grant Administrators:f
**************************

(xcalcs & rmtshare are from the NT resource kit)

Next process all the exported userid through this batch script using the FOR command. For an example of doing this see

http://www.jsiinc.com/

If I had to do this, this is how I would do it.

But if you wish to do it in a script from Win95 clients, I think you might

1)create a global share called "users" and attach it with "use" or shell out to "net use".
2) check for the existance of the subdirectory "userid"
3) if it doesn't exist create it
4) shell out to "net share" to create a share for the sub-directory "userid".

I don't believe Win9x clients have any control over setting ownership permissions on the NT server but I suspect that the default permissions set will be the users & this is what you want.


PS: In NT there are 2 kinds of permissions. One relates to ownership & is set by calcs or xcalcs. I do not believe this can be directly controlled by Win9x clients. The second kind is share permissions. These can be set by "net share" in both NT & Win9x clients. If you have NT clients you can also use rmtshare which provides you with greater flexibility. In your note it is not clear which type of permission you are refering to.

[This message has been edited by JackLothian (edited 24 May 2000).]

_________________________
Jack

Top
#3089 - 2000-05-24 03:59 PM Re: Win95 "switch user"
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
There is confusion afoot...

I've already done all that. The problem is that the user login doesn't have permissions to run Xcacl or Rmtshare - that's why I use the SUService to do the work and it works fine.

The users logging onto win95 have no SUService and thus do not have permissions to use Xcacl or Rmtshare.

I'm not going for a one-time once-over. The idea is to have the login script automagically create and share the home drive for new or relocated users after.

Like I said, I know how to dfo all this stuff successfully from NT. It's the 95 side that escapes me. I looked into the suggestion to map to the global share and "net share" the sub directory but there are two problems. First, you can't net share to a network drive, and second Win9x doesn't even have "Net Share".

I was then resolve to run a subst command but you can't subst to a network drive.

This Sucks. From the looks of things I'm SOL.

Here's my code anyways:

$filesvr="cfricke-nt"
$homedrive="\\" + $filesvr + "\" + @userid + "$$"
$users="\users"
$basedrive="\\" + $filesvr + $users
$lserver=@lserver + "\netlogon"
use H: "$homedrive"
if @ERROR <> "0"
select
case @inwin = "1"
use H: "$basedrive"
$userdir=Exist("H:\@userid")
if $userdir = "0"
MD "H:\@userid"
endif
SETL "FILESVR=\\$filesvr"
SETL "USERID=@userid"
SETL "LDRIVE=@ldrive"
SETL "LSERVER=$lserver"
shell '%comspec% /c su.exe suservice < \\Tbird\shared$\SU-daily.txt "%LSERVER%\rmtshare.exe %FILESVR%\%USERID%$=d:\users\%USERID% /grant %USERID%:c /remove everyone"'
shell '%comspec% /c su.exe suservice < \\Tbird\shared$\SU-daily.txt "%LSERVER%\xcacls.exe H:\%USERID% /T /C /G %USERID%:C /Y"'
use H: /d
use H: "$homedrive"
case @inwin = "2"
if exist ("H:")
use H: /d
endif
use H: "\\TBird\shared$$"
$sharedrive = "H:\needshare"
$sharefile = @userid + "_" + $filesvr + ".txt"
$sharepath = $sharedrive + "\" + $sharefile
$sharequery = Exist("$sharepath")
if $sharequery <> "1"
OPEN (1,"$sharepath",5)
endif
use H: /d
MESSAGEBOX("Attention @userid! Your homedrive to \\$filesvr has not been mapped! Please call the HelpDesk at x8346.","Attention",04804096,15)
case 1
; unknown operating system
endselect
endif
cls

------------------
Chris Fricke
Clackamas County

[This message has been edited by Manimal (edited 24 May 2000).]

[This message has been edited by Manimal (edited 24 May 2000).]

_________________________
Chris Fricke
Clackamas County

Top
#3090 - 2000-05-25 10:56 AM Re: Win95 "switch user"
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
The concepts of SU & setting file ownership do not exist in Win9x & I know of no way to add them to the Win9x system. I believe this is a dead end, I don't think you will find a way to graft these concepts onto Win9x. These concepts potentially only exist with NT or Win2000 clients. All other clients such as Unix, Win3x, Win9x, Linux, etc would not have this capability. Also if your server is anything but NT or Win200 the capability would not be there. I believe MS created these concepts soley to foster NT to NT communications.

This isn't your immediate problem though, since all you really need to do is define a share on the server & allow the user to access it.

I believe "net share" does work on Win95 since I am sure I have used "Net Share" with DOS. It is some years ago but I am sure I use to use "net share" quite a bit with DOS. If it works in DOS then it must work in Win9x. Having said that, I am wondering if maybe "net share" only works locally on a DOS machine. This is something I will have to test since it is not something I used frequently. I will try to find some time this weekend. In the meantime open a DOS box on a Win9x machine and type "Net ?" and "Net ? share" and see what it says. (Sorry I am on an NT machine right now.)

I still think the answer is to do this on the server. I believe most administrators do it this way. Write a small utility that creates new accounts & set the user share at the same time. This plus a mass move utility should cover most of your everyday issues. The rest can be handled manually with the User Manager.

[This message has been edited by JackLothian (edited 25 May 2000).]

_________________________
Jack

Top
#3091 - 2000-05-29 02:56 PM Re: Win95 "switch user"
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
i tested net share on a win95 machine & you are right. While Net share is available in DOS & in NT it is not available in Win95. Strange. I don't think it would help to use the DOS version because it seems to say you can only use it on local drives not server drives.

I did find a tool that will set permissions from a Win95 machine - "nexus" the NT server manager for Win95 from MS. Unfortunately, I don't think it will help since you must logon with an admin account & it only runs in GUI mode.

The only thing I can think is to write a file to the server & run a service on the server that frequenctly looks for the file. Inside the file put the name & location of the share & then when you detect the file run a script to add the share.

Ugly, but I can't think of anything better.

_________________________
Jack

Top
#3092 - 2000-05-31 12:26 AM Re: Win95 "switch user"
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
thanks man

But I think that's a bit too ugly for me to rely upon - I've instead resolved for the script to pop up a message box informint the user of their h: drive status, or lack thereof, and recommending a call to the Help Desk.

We have about a 50/50 split between Win9x and NT so at least I got half...

------------------
Chris Fricke
Clackamas County

_________________________
Chris Fricke
Clackamas County

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 1946 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.189 seconds in which 0.15 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