summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-26 04:58:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:50 -0500
commit122bb5642cfda604d90acfcb05e43e1c1f68bcea (patch)
tree587d7ab2fce05bee645e0325f32bdb7a6f31b55a /source4
parent0add9cb6fc609751afdeea43f710920832311711 (diff)
downloadsamba-122bb5642cfda604d90acfcb05e43e1c1f68bcea.tar.gz
samba-122bb5642cfda604d90acfcb05e43e1c1f68bcea.tar.bz2
samba-122bb5642cfda604d90acfcb05e43e1c1f68bcea.zip
r7921: fixed newuser script (letting samldb module allocate the sid)
(This used to be commit 45d08e94d27f837ab7788471b07e8c0c9b061c39)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/setup/newuser.pl13
1 files changed, 0 insertions, 13 deletions
diff --git a/source4/setup/newuser.pl b/source4/setup/newuser.pl
index d72c73a326..dc9613e4aa 100755
--- a/source4/setup/newuser.pl
+++ b/source4/setup/newuser.pl
@@ -99,24 +99,11 @@ my $domain_dn = search("(objectClass=domainDNS)", "dn");
my $ldif = `ldbsearch -H $opt_samdb 'cn=TemplateUser' | grep -v Template | grep -v '^#'`;
chomp $ldif;
-my $sid;
-
-# crude way of working out a rid
-for (my $i=1001;$i<1100;$i++) {
- if (search("objectSid=$domain_sid-$i","objectSid") eq "") {
- $sid = "$domain_sid-$i";
- last;
- }
-}
-
-print "Chose new SID $sid\n";
-
my $dom_users = search("name=Domain Users", "dn");
$ldif .= "sAMAccountName: $opt_username\n";
$ldif .= "name: $opt_username\n";
-$ldif .= "objectSid: $sid\n";
$ldif .= "objectGUID: " . randguid() . "\n";
$ldif .= "memberOf: $dom_users\n";
$ldif .= "userAccountControl: 0x10200\n";