From 2395cd57f8920bdde3a0c71eeb945d10c621bbbe Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 6 Oct 2006 20:09:10 +0000 Subject: [PATCH] =?UTF-8?q?r19158:=20Remove=20root=20and=20nobody=20users?= =?UTF-8?q?=20from=20ldif,=20from=20Bj=C3=B6rn=20Jacke=20(This=20used=20to?= =?UTF-8?q?=20be=20commit=2017880d6cadbb0b1b428430c26bb4b4545eb834ff)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source3/utils/net_rpc_samsync.c | 64 +-------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 1337c11eca1..10b9495332b 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -29,7 +29,7 @@ /* uid's and gid's for writing deltas to ldif */ static uint32 ldif_gid = 999; static uint32 ldif_uid = 999; -/* Kkeep track of ldap initialization */ +/* Keep track of ldap initialization */ static int init_ldap = 1; static void display_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *g) @@ -1104,37 +1104,6 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch fflush(add_fd); } - /* Write the root entity */ - fprintf(add_fd, "# root, %s, %s\n", user_attr, suffix); - fprintf(add_fd, "dn: uid=root,ou=%s,%s\n", user_attr, suffix); - fprintf(add_fd, "cn: root\n"); - fprintf(add_fd, "sn: root\n"); - fprintf(add_fd, "objectClass: inetOrgPerson\n"); - fprintf(add_fd, "objectClass: sambaSAMAccount\n"); - fprintf(add_fd, "objectClass: posixAccount\n"); - fprintf(add_fd, "objectClass: shadowAccount\n"); - fprintf(add_fd, "gidNumber: 0\n"); - fprintf(add_fd, "uid: root\n"); - fprintf(add_fd, "uidNumber: 0\n"); - fprintf(add_fd, "homeDirectory: /home/root\n"); - fprintf(add_fd, "sambaPwdLastSet: 0\n"); - fprintf(add_fd, "sambaLogonTime: 0\n"); - fprintf(add_fd, "sambaLogoffTime: 2147483647\n"); - fprintf(add_fd, "sambaKickoffTime: 2147483647\n"); - fprintf(add_fd, "sambaPwdCanChange: 0\n"); - fprintf(add_fd, "sambaPwdMustChange: 2147483647\n"); - fprintf(add_fd, "sambaHomePath: \\\\PDC-SRV\\root\n"); - fprintf(add_fd, "sambaHomeDrive: H:\n"); - fprintf(add_fd, "sambaProfilePath: \\\\PDC-SRV\\profiles\\root\n"); - fprintf(add_fd, "sambaprimaryGroupSID: %s-512\n", sid); - fprintf(add_fd, "sambaLMPassword: XXX\n"); - fprintf(add_fd, "sambaNTPassword: XXX\n"); - fprintf(add_fd, "sambaAcctFlags: [U\n"); - fprintf(add_fd, "sambaSID: %s-500\n", sid); - fprintf(add_fd, "loginShell: /bin/false\n"); - fprintf(add_fd, "\n"); - fflush(add_fd); - /* Write the domain entity */ fprintf(add_fd, "# %s, %s\n", lp_workgroup(), suffix); fprintf(add_fd, "dn: sambaDomainName=%s,%s\n", lp_workgroup(), @@ -1148,37 +1117,6 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const ch fprintf(add_fd, "\n"); fflush(add_fd); - /* Write user nobody entity */ - fprintf(add_fd, "# nobody, %s, %s\n", user_attr, suffix); - fprintf(add_fd, "dn: uid=nobody,ou=%s,%s\n", user_attr, suffix); - fprintf(add_fd, "cn: nobody\n"); - fprintf(add_fd, "sn: nobody\n"); - fprintf(add_fd, "objectClass: inetOrgPerson\n"); - fprintf(add_fd, "objectClass: sambaSAMAccount\n"); - fprintf(add_fd, "objectClass: posixAccount\n"); - fprintf(add_fd, "objectClass: shadowAccount\n"); - fprintf(add_fd, "gidNumber: 514\n"); - fprintf(add_fd, "uid: nobody\n"); - fprintf(add_fd, "uidNumber: 999\n"); - fprintf(add_fd, "homeDirectory: /nobodyshomedir\n"); - fprintf(add_fd, "sambaPwdLastSet: 0\n"); - fprintf(add_fd, "sambaLogonTime: 0\n"); - fprintf(add_fd, "sambaLogoffTime: 2147483647\n"); - fprintf(add_fd, "sambaKickoffTime: 2147483647\n"); - fprintf(add_fd, "sambaPwdCanChange: 0\n"); - fprintf(add_fd, "sambaPwdMustChange: 2147483647\n"); - fprintf(add_fd, "sambaHomePath: \\\\PDC-SMD3\\homes\\nobody\n"); - fprintf(add_fd, "sambaHomeDrive: H:\n"); - fprintf(add_fd, "sambaProfilePath: \\\\PDC-SMB3\\profiles\\nobody\n"); - fprintf(add_fd, "sambaprimaryGroupSID: %s-514\n", sid); - fprintf(add_fd, "sambaLMPassword: NOPASSWORDXXXXXXXXXXXXXXXXXXXXX\n"); - fprintf(add_fd, "sambaNTPassword: NOPASSWORDXXXXXXXXXXXXXXXXXXXXX\n"); - fprintf(add_fd, "sambaAcctFlags: [NU\n"); - fprintf(add_fd, "sambaSID: %s-2998\n", sid); - fprintf(add_fd, "loginShell: /bin/false\n"); - fprintf(add_fd, "\n"); - fflush(add_fd); - /* Write the Domain Admins entity */ fprintf(add_fd, "# Domain Admins, %s, %s\n", group_attr, suffix);