Hi,
I have successfully used the using the Map function in Win32::FileOp.
I would try using Win32::FileOp to see if you get the same error
message. Then, you can rule out your Perl code and focus on network issues.
HTH
On Wed, Mar 23, 2011 at 4:20 AM, Natxo Asenjo <natx...@gmail.com>wrote:
> hi,>> I need to mount a samba share from Perl. This is the code:>> #!perl>> use warnings;> use strict;>> use Win32::NetResource;>> my %netresource = (> RemoteName => "\\\\server\share" ,> );>> my $username = "user" ; # also tried "workgroup\\user"> my $password = "password" ;>> # print "$username\n" ;> # print "$password\n" ;>> my $mapping = Win32::NetResource::AddConnection(> \%netresource, $username, $password, 0 ) or warn win32err();>> sub win32err {> my $err;> Win32::NetResource::GetError($err);> Win32::FormatMessage($err);> }>> When I run it, I get:>> Z:\scripts>perl mapshare.pl> The specified network password is not correct.>> I know the username/password combo is correct, because using net use> it works. I have tried adding the workgroup to the $username like so:> $username = "workgroup\\user" but to no avail.>> The samba server is not a part of a domain, it has its own workgroup.>> Has anyone gotten such a setup to work?>> TIA,> --> Groeten,> natxo> _______________________________________________> Perl-Win32-Admin mailing list> Perl...@listserv.ActiveState.com> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs<http://listserv.activestate.com/mailman/mysubs>>
_______________________________________________
Perl-Win32-Admin mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs