Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy file to a network share with different username and password

Tags:

perl

I was wondering of this is possible in Perl

I want to access a network file share (NT) to copy a file using different username and password

This perl script is part of build and will be running in server without any user interaction

Thanks

Karthik

like image 437
KK99 Avatar asked Dec 06 '25 12:12

KK99


1 Answers

This post on perlmonks seems to cover that topic: http://www.perlmonks.org/?node_id=491533

Win32::NetResource has an AddConnection function that you could pass USERNAME and PASSWORD to.

like image 116
eckes Avatar answered Dec 09 '25 17:12

eckes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!