s3_upgrade: Do not add administrator and root accounts from s3 to s4
[idra/samba.git] / source4 / scripting / python / samba / upgrade.py
index 62266818304fa64ba201e905eb4bbe7b9baf2aee..ed13d101e99d6be1f585fc80392fce4200875dbd 100644 (file)
@@ -637,6 +637,8 @@ def upgrade_from_samba3(samba3, logger, session_info, smbconf, targetdir):
     # Export users to samba4 backend
     logger.info("Importing users")
     for username in userdata:
+        if username.lower() == 'administrator' or username.lower() == 'root':
+            continue
         new_passdb.add_sam_account(userdata[username])
         if username in uids:
             add_idmap_entry(result.idmap, userdata[username].user_sid, uids[username], "UID", logger)