pavallokazzo Posted November 9, 2008 Share Posted November 9, 2008 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 privateset user=set pass=net use z: \\server\publicif 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 1219I'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 More sharing options...
Tripredacus Posted November 10, 2008 Share Posted November 10, 2008 1219 is a credentials error. Make sure you are using the correct password. Also make sure you aren't logging onto the same server with two different credential sets.http://support.microsoft.com/kb/98724 Link to comment Share on other sites More sharing options...
pavallokazzo Posted November 10, 2008 Author Share Posted November 10, 2008 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 More sharing options...
Tripredacus Posted November 11, 2008 Share Posted November 11, 2008 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 More sharing options...
Noise Posted November 11, 2008 Share Posted November 11, 2008 (edited) Try using /USER: instead of /u:Make sure the username and password don't have spaces in them Edited November 11, 2008 by Nois3 Link to comment Share on other sites More sharing options...
pavallokazzo Posted November 11, 2008 Author Share Posted November 11, 2008 DID IT!You have to first authenticate then open the connection to the shares:net use \\server /user:%user% %pass%net use Z: \\server\privatenet use Y: \\server\publicPlz 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 More sharing options...
pavallokazzo Posted November 11, 2008 Author Share Posted November 11, 2008 I've noticed that know I can't log in using a different user...If I use another user it won't ask for the password, seems like it's cached somewhere...How can I release those password saved? any help?thanks Link to comment Share on other sites More sharing options...
pavallokazzo Posted November 11, 2008 Author Share Posted November 11, 2008 Sry guys... the rush...just restart and it will release the keys Link to comment Share on other sites More sharing options...
Tripredacus Posted November 12, 2008 Share Posted November 12, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now