Jump to content

net use etc etc - error 1219 ONLY ON VISTA!


pavallokazzo

Recommended Posts

Hello everybody!

I need an help on Vista.

I've got a script that connects a vista machine at 2 shares, one public and the other private

set user=

set pass=

net use z: \\server\public

if not defined %user% set /p user=Username:

net use y: \\server\private /u:%user% %pass%

Now who use this script can complete the declaration of variables to auto-login at runtime instead of having to give the "keys" during the script execution.

You can reuse it if you want ;)

More it creates 2 connections:

- public (that's just guest: users are mapped to guest account)

- private (it's a folder for every user, given the right credentials the server will open connection to your private folder)

On win xp this script DOES works.

On Vista instead it will lead everytime to error 1219

I've tried adding a net * /delete before the script, restart the computer etc etc but nothing came out. Still 1219.

Any solutions? Do I have to use the "net use \\IP" trick? Is there a way to get by script the IP address from a NBT name?

Also on the server-side (is a Linux-Samba machine but that's the same cause I've noticed this also happen on Windows) if I launch smbtree (to get a "tree-view" of the machine+share in the network) every time, for every machine, it tries to get share's list from 192.210.85.something while my network it's in a classic 192.168.0 environment.

Result of this operation is always a timeout (the other side didn't respond). What can be this? Maybe we are using an outside WINS server? Or are we under attack?!?!?

HELP!

Thanks.

Link to comment
Share on other sites


I'm sure I am using the right credentials and sure I don't have any other connection opened...

However:

- this script on win xp DOES work

- As I've already saved I've added at the script net use * /delete before the connection to be sure "connection table" was "free"

Do anybody knows how can I traceback this error on vista? Like logs, advice etc etc...?

Thanks

Link to comment
Share on other sites

I do know that your script will always generate an error if there is no username given. You need to make it so if no username is given, then it doesn't attempt to connect to the share that requires it.

You can set up audit rules for both the client and the server. Have it audit failed logon attempts. Of course you can only do this if you have access to the Group Policy Object Editor, which only is in Vista Ultimate and Business, but should be in 2003 or any other OS you might have on the server.

Link to comment
Share on other sites

DID IT!

You have to first authenticate then open the connection to the shares:

net use \\server /user:%user% %pass%

net use Z: \\server\private

net use Y: \\server\public

Plz notice that the public share connection is mapped to guest (using samba on debian, linux), so every connection on that share will be open as a guest user.

Link to comment
Share on other sites

Yea it doesn't like using two different credential sets to log into one server. You shouldn't need to do it that way, just make a new user with access to the other folder or adjust the permissions on the one you are using already.

Good to see you've fixed it. I hadn't set a password like that before.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...