summaryrefslogtreecommitdiff
path: root/source4/setup/newuser.pl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/setup/newuser.pl')
-rwxr-xr-xsource4/setup/newuser.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/setup/newuser.pl b/source4/setup/newuser.pl
index 6ddda5028e..a38067219e 100755
--- a/source4/setup/newuser.pl
+++ b/source4/setup/newuser.pl
@@ -40,7 +40,7 @@ sub search($$)
{
my $expr = shift;
my $attrib = shift;
- my $res = `ldbsearch \"$expr\" $attrib | grep ^$attrib | cut -d' ' -f2- | head -1`;
+ my $res = `ldbsearch -H $opt_samdb \"$expr\" $attrib | grep ^$attrib | cut -d' ' -f2- | head -1`;
chomp $res;
return $res;
}
@@ -96,7 +96,7 @@ $ENV{"LDB_URL"} = $opt_samdb;
my $domain_sid = search("(objectClass=domainDNS)", "objectSid");
my $domain_dn = search("(objectClass=domainDNS)", "dn");
-my $ldif = `ldbsearch 'cn=TemplateUser' | grep -v Template | grep -v '^#'`;
+my $ldif = `ldbsearch -H $opt_samdb 'cn=TemplateUser' | grep -v Template | grep -v '^#'`;
chomp $ldif;
my $sid;