Using Perl to connect UNC Filepaths on Domain


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using Perl to connect UNC Filepaths on Domain
# 1  
Old 09-24-2010
Using Perl to connect UNC Filepaths on Domain

I'm trying to use Perl on Windows (Doh!) to connect to a folder on a Domain Controller via UNC.

Right now, I have
Code:
 perl -e "`runas /user:DOMAIN\\Username dir \\\\SERVER\\d\$\\Path`"

This does not seem to connect nor does it prompt for password. Should I try throwing it into a script and have it work with "expect"?

This is my first experience trying to incorporate UNC with anything so all comments will be appreciated.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Connect to Oracle with Perl through Cygwin

I try to connect to Oracle through cygwin, but it fails. The Oracle version 11.2 is installed on a Windows 2003 server. Cygwin and Perl is installed on the same server. cygwin>uname -a CYGWIN_NT-5.2 N0871 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin cygwin>perl -v This is perl, v5.10.1... (3 Replies)
Discussion started by: MSiipola
3 Replies

2. Shell Programming and Scripting

Determine if variable is the Server component of UNC

Hi all, Using sh/csh, unfortunately shell scripts are not my strong suit. Trying to write a script that gets called from a program for pre-processing. The program passes individual components of a UNC (//server/path1/path2/filename). Thus the unc path of: //server/path1/path2/filename, is... (7 Replies)
Discussion started by: Festus Hagen
7 Replies

3. Shell Programming and Scripting

Parse file name out of UNC path

Hello, I searched the forums and didn't see a situation like this: I cannot figure out how to parse out just the file name from the full path. The path looks like this: \\foo\bar\filename.ext I don't think something like 'cut' will work so I tried to whip up a regex but couldn't get it... (12 Replies)
Discussion started by: bytesnoop
12 Replies

4. Shell Programming and Scripting

how to substitute filepaths with sed or awk?

I am having the following problem. I am having a lot of files (test_1_01.hea, test_1_02.hea, etc) with the content: project_directory /net/1/d_1/5/ tmp_directory /net/1/d_1/5/ material_directory /net/1/d_1/5/ And I have to substitute the filepaths with new counted ones where the... (3 Replies)
Discussion started by: ergy1983
3 Replies

5. Shell Programming and Scripting

Connect to NCBI using perl

hai everybody - wish you a happy and prosperous new year I want to connect to NCBI database and I need to track the updates made on database automatically. Can I do this in PERL, if yes means , please guide me ............... Thank You (1 Reply)
Discussion started by: pnehru156
1 Replies

6. Shell Programming and Scripting

How to connect ORACLE using PERL

Hi Friends, I am having Perl 5 and Oracle 9i. I just wanna to connect Oracle DB & to perform some select query statement. Could anyone pls let me know. I've tried below command which i found in some website, But it throws some error.:confused: Executed: perl -e 'use DBI; print... (1 Reply)
Discussion started by: Vijayakumarpc
1 Replies

7. Linux

regaridn connect to domain

sir plz let me know how can i connect to my company domain my linux machine. and get mail as i get in outlook, n others can c me in network. (1 Reply)
Discussion started by: gauravsharma29
1 Replies

8. UNIX for Advanced & Expert Users

Samba does not connect to domain

I have a samba server and a raid SAN which is actually running samba. Neither one lets me access anything on the samba unix side. I really do not know where to look anymore. there are no errors. When I try to connect to the samba server I get prompted with login and password repeatedly. Frank (4 Replies)
Discussion started by: frankkahle
4 Replies

9. Shell Programming and Scripting

Is there any way to connect to soulseek with perl?

Hello im trying to find way to connect to soulseek with perl to try and work with soulseek in none graphic mode , can perl do that ? thanks (0 Replies)
Discussion started by: umen
0 Replies
Login or Register to Ask a Question
SMBTORTURE(1)							    Test Suite							     SMBTORTURE(1)

NAME
smbtorture - Run a series of tests against a SMB server SYNOPSIS
smbtorture {//server/share} [-d debuglevel] [-U user%pass] [-k] [-N numprocs] [-n netbios_name] [-W workgroup] [-o num_operations] [-e num files(entries)] [-O socket_options] [-m maximum_protocol] [-L] [-c CLIENT.TXT] [-t timelimit] [-C filename] [-A] [-p port] [-s seed] [-f max_failures] [-X] {BINDING-STRING|UNC} {TEST1} [TEST2] [...] DESCRIPTION
smbtorture is a testsuite that runs several tests against a SMB server. All tests are known to succeed against a Windows 2003 server (?). Smbtorture's primary goal is finding differences in implementations of the SMB protocol and testing SMB servers. Any number of tests can be specified on the command-line. If no tests are specified, all tests are run. If no arguments are specified at all, all available options and tests are listed. Binding string format The binding string format is: TRANSPORT:host[flags] Where TRANSPORT is either ncacn_np for SMB, ncacn_ip_tcp for RPC/TCP or ncalrpc for local connections. 'host' is an IP or hostname or netbios name. If the binding string identifies the server side of an endpoint, 'host' may be an empty string. 'flags' can include a SMB pipe name if using the ncacn_np transport or a TCP port number if using the ncacn_ip_tcp transport, otherwise they will be auto-determined. other recognised flags are: sign enable ntlmssp signing seal enable ntlmssp sealing connect enable rpc connect level auth (auth, but no sign or seal) validate enable the NDR validator print enable debugging of the packets bigendian use bigendian RPC padcheck check reply data for non-zero pad bytes For example, these all connect to the samr pipe: o ncacn_np:myserver o ncacn_np:myserver[samr] o ncacn_np:myserver[\pipe\samr] o ncacn_np:myserver[/pipe/samr] o ncacn_np:myserver[samr,sign,print] o ncacn_np:myserver[\pipe\samr,sign,seal,bigendian] o ncacn_np:myserver[/pipe/samr,seal,validate] o ncacn_np: o ncacn_np:[/pipe/samr] o ncacn_ip_tcp:myserver o ncacn_ip_tcp:myserver[1024] o ncacn_ip_tcp:myserver[1024,sign,seal] o ncalrpc: UNC Format The UNC format is: //server/share OPTIONS
-d debuglevel Use the specified Samba debug level. A higher debug level means more output. -U user%pass Use the specified username/password combination when logging in to a remote server. -k Use kerberos when authenticating. -W workgroup Use specified name as our workgroup name. -n netbios_name Use specified name as our NetBIOS name. -O socket_options Use specified socket options, equivalent of the smb.conf option "socket options". See the smb.conf(5) manpage for details. -m max_protocol Specify the maximum SMB dialect that should be used. Possible values are: CORE, COREPLUS, LANMAN1, LANMAN2, NT1 -s seed Initialize the randomizer using seed as seed. -L Use oplocks. -X Enable dangerous tests. Use with care! This might crash your server... -t timelimit Specify the NBENCH time limit in seconds. Defaults to 600. -p ports Specify ports to connect to. -c file Read NBENCH commands from file instead of from CLIENT.TXT. -A Show not just OK or FAILED but more detailed output. Used only by DENY test at the moment. -C filename Load a list of UNC names from the specified filename. Smbtorture instances will connect to a random host from this list. -N numprocs Specify number of smbtorture processes to launch. -o num_operations Number of times some operations should be tried before assuming they're output is consistent (default:100). -e num_files Number of entries to use in certain tests (such as creating X files) (default: 1000). -f max_failures Number of failures before aborting a test (default: 1). VERSION
This man page is correct for version 4.0 of the Samba suite. SEE ALSO
Samba AUTHOR
This utility is part of the Samba[1] suite, which is developed by the global Samba Team[2]. smbtorture was written by Andrew Tridgell. This manpage was written by Jelmer Vernooij. NOTES
1. Samba http://www.samba.org/ 2. Samba Team http://www.samba.org/samba/team/ Samba 4.0 06/17/2014 SMBTORTURE(1)