selftest: Call smbpasswd as root.
authorAndreas Schneider <asn@samba.org>
Wed, 2 Apr 2014 13:41:34 +0000 (15:41 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Apr 2014 12:56:05 +0000 (14:56 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
selftest/target/Samba3.pm

index 3188d7261cc7a70740c70d147281c452a8f632c3..bd19634036e788bde177e9dc27d906e3d5808f33 100755 (executable)
@@ -1206,7 +1206,7 @@ domadmins:X:$gid_domadmins:
        $ENV{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd;
        $ENV{NSS_WRAPPER_GROUP} = $nss_wrapper_group;
 
-        my $cmd = Samba::bindir_path($self, "smbpasswd")." -c $conffile -L -s -a $unix_name > /dev/null";
+        my $cmd = "UID_WRAPPER_ROOT=1 " . Samba::bindir_path($self, "smbpasswd")." -c $conffile -L -s -a $unix_name > /dev/null";
        unless (open(PWD, "|$cmd")) {
              warn("Unable to set password for test account\n$cmd");
              return undef;