blob: f78f24715f018ece28067a0949b42a0df3fde603 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- plugins-scripts/check_disk_smb.pl.old 2005-04-15 16:22:18.000000000 +0200
+++ plugins-scripts/check_disk_smb.pl 2005-04-15 16:25:44.000000000 +0200
@@ -76,7 +76,7 @@
my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]+)$/);
($user) || usage("Invalid user: $opt_u\n");
-($opt_p) || ($opt_p = shift) || ($opt_p = "guest");
+($opt_p) || ($opt_p = shift) || ($opt_p = "");
my $pass = $1 if ($opt_p =~ /(.*)/);
($opt_w) || ($opt_w = shift) || ($opt_w = 85);
@@ -123,10 +123,10 @@
# Execute an "ls" on the share using smbclient program
# get the results into $res
if (defined($workgroup)) {
- $res = qx/$smbclient \/\/$host\/$share $pass -W $workgroup -U $user $smbclientoptions -c ls/;
+ $res = qx/$smbclient \/\/$host\/$share -W $workgroup -U $user%$pass $smbclientoptions -c ls/;
} else {
print "$smbclient " . "\/\/$host\/$share" ." $pass -U $user $smbclientoptions -c ls\n" if ($verbose);
- $res = qx/$smbclient \/\/$host\/$share $pass -U $user $smbclientoptions -c ls/;
+ $res = qx/$smbclient \/\/$host\/$share -U $user%$pass $smbclientoptions -c ls/;
}
#Turn off alarm
alarm(0);
|