Log in

View Full Version : Stupid 9x/DOS question


?ferret
February 18th, 2002, 21:10
Hi all,

As the heading implies, I have a really dumb 9x question. Actually an MS-DOS question I guess.

Is there a way under the 9x version of MS-DOS to allow user access control using net use? NT/2000 have /user param, but it isn't supported in 9x version of net use. Any other way that I'm missing, or maybe a small (little less than a floppy) 3rd party prog that allows user/pass combo to be passed while mapping a drive?

This one has me stumped, I can't believe there isn't a way to use user level access instead of share level in 9x.

(btw, if anyone cares, I'm trying to save about 10 minutes or so per install of a proggie at work that I have to install a few dozen times by automating most of it with a batch file & pulling the install from a server. If I can make this work, I only have to reboot once. Originally I had to reboot 4 times before it was over....good ol' 9x)

-------Wierd, I coulda sworn I was in Off Topic forum when I posted this...oh well...I guess MS-DOS is a tool ;-)----------------

Woodmann
February 18th, 2002, 22:24
Howdy,
I dont completely understand the question but,
C:\>net use p: \\network drive here?\ipc$

Thats my guess.

Peace, Woodmann

DakienDX
February 19th, 2002, 02:35
Hello ?ferret !

I think you can find the answer here.

Code:
NET USE [drive: | *] [\\computer\directory [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]
NET USE [port:] [\\computer\printer [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]

NET USE drive: | \\computer\directory /DELETE [/YES]
NET USE port: | \\computer\printer /DELETE [/YES]
NET USE * /DELETE [/YES]

NET USE drive: | * /HOME

drive Specifies the drive letter you assign to a
shared directory.
* Specifies the next available drive letter.
If used with /DELETE, specifies to
disconnect all of your connections.
port Specifies the parallel (LPT) port name you
assign to a shared printer.
computer Specifies the name of the computer sharing
the resource.
directory Specifies the name of the shared directory.
printer Specifies the name of the shared printer.
password Specifies the password for the shared
resource, if any.
? Specifies that you want to be prompted for the
password of the shared resource. You don't
need to use this option unless the password is
optional.
/SAVEPW:NO Specifies that the password you type
should not be saved in your password-list
file. You need to retype the password the
next time you connect to this resource.
/YES Carries out the NET USE command without
first prompting you to provide information or
confirm actions.
/DELETE Breaks the specified connection to a shared
resource.
/NO Carries out the NET USE command, responding
with NO automatically when you are prompted
to confirm actions.
/HOME Makes a connection to your HOME directory if
one is specified in your LAN Manager or
Windows NT user account.

To list all of your connections, type NET USE without
options.

?ferret
February 20th, 2002, 00:41
Dakiendx:

No offense but I know how to list param options for DOS commands.....as you can see in your listing, there is no /user param or equivelant

Woodmann:

What I mean is say my domain name, logon & pass are:

domain
qferret
password

I could go to a 2000 machine that isn't logged on to that domain and type:

net use f: \\server\sharepath /user domain/qferret password

and it would map the drive.

Under 9x I can only map it if there is a password for the share itself, regardless of user...at least AFAIK....hence the question

Is there a way to pass a username param to 9x ver of net use.....or a small 3rd party util that allows this?

(I've never really understood what IPC$ does, but I can try it to see if it works ;-) )

DakienDX
February 20th, 2002, 02:44
Hello ?ferret !

Sorry, but I didn't understand your question in the right way.

As far as I know, you can only access a share on a NT-domain if you've already logged into it.

Under "Control Panel"->"Network" you have a checkbox which enables you to log into a NT-domain at startup. If you don't like it simply press ESC. You can ask your admin to put a "NET USE ..." in your login script. So you only get connected to a drive if you are logged into the domain.

I'll try IPC$ at work, maybe it works. On my computer it says that it can only used on the server. (I also never understood what IPC$ should be used for.)

A few minutes with Google told me that there is no workaround in Win9x/ME. But if you need to access two domains form Win9x/ME, you should make sure that your Username/Password are the same on both domains.

?ferret
February 20th, 2002, 11:46
Thanks for the try Woodmann, but IPC$ justs asks me for another password that I don't know hehe.

However, could I trouble you for a short explanation as to what IPC$ does/how it works? I have run into it before mapping to an AS/400 w/ certain versions of Client Access and would like to find out what/why/how ;-)

?ferret
February 20th, 2002, 21:04
Maybe a different approach?

Is it possible to run a batch file from a server OTHER than at logon time that would map the drive etc.? I'm really just trying to automate an installation that requires a mapped drive at all times & network policies tend to get in the way, so I have to change a few registry keys before hand to allow me to map the drive for the first time etc. Then I map the drive, and run the install.

Example that works on W2K (names changed to protect the innocent):

regedit /s a:\regfix.reg
net use f: \\server\sharepath /user domain/qferret password
\\server2\installshare\setup.exe -s setup.iss

The batch file runs great on 2000, but fails miserably on 9x.

It takes about 20 seconds to pop in the floppy, and run setup.bat, while it takes about 10-15 minutes to run regedit/poledit, map the drive by hand, and run the install. I have already shaved most of that off by using the .reg file and creating the silent install package, but I could do better if I only had to go Start->run->a:\setup.bat (or \\servername\sharename\setup.bat)

Anyway, I've rambled on more than enough & if you read past the 1st 2 sentences, I'll forgive you for not answering until you wake up from the boredom induced nap I've sent you on ;-)

Woodmann
February 20th, 2002, 21:38
Howdy,
IPC$=interprocess communication.
You should be able to set a null session.
I have not done much "NET USE" so I am just guessing here.
A lot of the stuff I have seen concerning 98/net use has been
with Samba.
There has to be something to make the whole process easier.
Perhaps Fyodor can help?

Peace, Woodmann

Kayaker
February 21st, 2002, 13:01
Quote:
Originally posted by ?ferret

Anyway, I've rambled on more than enough & if you read past the 1st 2 sentences, I'll forgive you for not answering until you wake up from the boredom induced nap I've sent you on ;-)


....ZZzzzssnort, huhh, whazzat?

Heh, just kidding. If I knew anything at all about the subject I'd do my best to confuse the issue in whatever way I could ;-)

Luck to you,
Kayaker

DakienDX
February 21st, 2002, 13:44
Hello ?ferret !

I had no luck at work mapping a drive to a different domain's share under Win98, but I found out something else interesting. Maybe it helps you.

If you're not logged into a domain, you can still access it's shares from DOS.

We have Win2000 Server running and when not being logged in, the command "Dir \\SERVER\SHARE" shows me all files viewable for all users. A "Subst X: \\SERVER\SHARE" fails, the same as trying to connect a drive via "NET USE", but "Dir", "Copy" and similar commands work fine.

?ferret
February 21st, 2002, 17:19
Thanks for the info DX, it doesn't help in this situation, but I know it WILL come in handy for installing programs that don't need the drive letter specific map.

LOL....Kayaker? confuse an issue? can't see it ;-)