HP3000-L Archives

May 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Mon, 14 May 2001 12:41:05 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
X-no-Archive:yes
We didn't do this, so I cannot just send you a command file for this. But I
can think about the problem.

Where does your checking procedures live? If it's on a PC, you can actually
use
net use \\smbserver\share
If the share recognizes this account name, you will be connected. If the
share cannot be found, you will get System error 53 has occurred.
The network path was not found.
and errorlevel will be set to 2, which you can then script for:
IF ERRORLEVEL 2 DO SOMETHING
Now, errorlevels are peculiar, in that if errorlevel is 2, it will also test
true for all lower values, meaning tests for 1 and 0 will also be true. So,
this can be tricky. Also, if the share does not recognize the PC's logon
account, you would be prompted for a password. It may be suitable to script
a known bad password.
net use \\smbserver\share BadPassword
which would give you
System error 1326 has occurred.
Logon failure: unknown user name or bad password.
Unfortunately, this also sets errorlevel 2, so at this point, you would need
to redirect the output into FIND to test for System error 1326 or against
System error 53. If this is the case, feel free to reply off-list, and I
would be happy to kibitz with you on various methods.

If you are using any other (non-MS) platform, then smbclient should offer
you some similar options. Attempt to connect, then parse the results. I bet
someone on the list already has some logic to detect smbclient errors.

However, if someone has broken RESLVCNF, aren't there then also other errors
that you could test for? Can the networking gurus offer some advice here?

Greg Stigers
http://www.cgiusa.com

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2