Is anyone see any error in the following code:
mapDrive = "\\\\MyServer\\C$"
data = {'remote' : mapDrive, 'local' : 'M:', 'password' :
'mypassword', 'user' : 'Administrator', 'asg_type' : 0}
win32net.NetUseAdd(None, 1, data)
It gives me "pywintypes.error: (1326, 'NetUseAdd', 'Logon failure:
unknown user name or bad password.')" and i cannot figured out why...I
searched the forum about the syntax of NetUseAdd command and i think
that the syntax is correct and also are the data that i pass to it.
(the same data can give me a connection if i use "net use ..." from a
command line"
So, what am i doing the wrong way (and keeps me on this the last 2
hours??...)
Thanks for a any enlightenment... 4 6434
king kikapu wrote:
Is anyone see any error in the following code:
mapDrive = "\\\\MyServer\\C$"
data = {'remote' : mapDrive, 'local' : 'M:', 'password' :
'mypassword', 'user' : 'Administrator', 'asg_type' : 0}
win32net.NetUseAdd(None, 1, data)
It gives me "pywintypes.error: (1326, 'NetUseAdd', 'Logon failure:
unknown user name or bad password.')" and i cannot figured out why...I
searched the forum about the syntax of NetUseAdd command and i think
that the syntax is correct and also are the data that i pass to it.
(the same data can give me a connection if i use "net use ..." from a
command line"
So, what am i doing the wrong way (and keeps me on this the last 2
hours??...)
Thanks for a any enlightenment...
I think your problem is that C$ is a "special" share. Try creating
a share and connect to it instead. It is either that your your userid/
password are in fact incorrect.
-Larry
I think your problem is that C$ is a "special" share. Try creating
a share and connect to it instead. It is either that your your userid/
password are in fact incorrect.
-Larry
No, my credentials are absolutely correct. As for the "$", what is the
possible problem with that ?? Net use is working great and i think
that also the net functions of win32api are working correct.
The problem must be in some other point...
king kikapu wrote:
Is anyone see any error in the following code:
mapDrive = "\\\\MyServer\\C$"
data = {'remote' : mapDrive, 'local' : 'M:', 'password' :
'mypassword', 'user' : 'Administrator', 'asg_type' : 0}
win32net.NetUseAdd(None, 1, data)
It gives me "pywintypes.error: (1326, 'NetUseAdd', 'Logon failure:
unknown user name or bad password.')" and i cannot figured out why...I
searched the forum about the syntax of NetUseAdd command and i think
that the syntax is correct and also are the data that i pass to it.
(the same data can give me a connection if i use "net use ..." from a
command line"
So, what am i doing the wrong way (and keeps me on this the last 2
hours??...)
Thanks for a any enlightenment...
You need to use level 2 info to pass the username.
Level 1 is for the old-style share with its own password.
Also, it should be 'username': instead of just 'user':.
hth
Roger
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
You need to use level 2 info to pass the username.
Level 1 is for the old-style share with its own password.
Also, it should be 'username': instead of just 'user':.
hth
Roger
Roger many-many thanks! That was it, i had to put "username" instead
of "user" and 2 instead of 1 at the calling...
Thanks again! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Red |
last post by:
In netscape bookmark files, there are lots of lines like this:
<DT><A HREF="http://www.commondreams.org/" ADD_DATE="1091500674"
LAST_CHARSET="ISO-8859-1" ID="rdf:#$uiYyb3">Common Dreams</A>
I...
|
by: Raymond Hettinger |
last post by:
For your amusement and edification, I'm working on a
series of Python puzzles designed to highlight areas of
the language known only to those who have read the
docs more than once.
Each of the...
|
by: Francis Avila |
last post by:
A few days ago (see the 'itertools.flatten()?' thread from October 28) I
became obsessed with refactoring a recursive generator that yielded the
leaves of nested iterables. When the dust settled,...
|
by: Morris Carré |
last post by:
Back then - in particular, soon after 9/11 - I evidenced the natural irony of
the standard python implementation, by showing it had the clear and
spontaneous humor of replying :
'BUSH'
when...
|
by: Jim Geissman |
last post by:
I have function that returns a table of information about properties. The
data comes from three different tables -- addresses (called PropertyID),
property characteristics, and events concerning...
|
by: William Wisnieski |
last post by:
Hello Everyone:
I'm having a very strange problem occurring with my Access 2000 database. I
call it the "mystery record."
Here's the story:
I have a query by form that returns a record set...
|
by: Mark Shelor |
last post by:
I've encountered a troublesome inconsistency in the C-language Perl
extension I've written for CPAN (Digest::SHA). The problem involves the
use of a static array within a performance-critical...
|
by: jojoba |
last post by:
Hi,
I hope this post is ok for this group.
Here's my deal:
I have two computers on my LAN at home.
One desktop. One laptop.
Both computers are wireless enabled (and wired enabled too).
I...
|
by: Sean Peterson |
last post by:
Has anyone had success using NetUseAdd() on shares that were replica links on a Windows 2003 DFS root? In my code, I'm getting error:
pywintypes.error: (67, 'NetUseAdd', 'The network name cannot...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |