summaryrefslogtreecommitdiff
path: root/source3/utils/net_sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_sam.c')
-rw-r--r--source3/utils/net_sam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index bd88a52602..44a0b79e18 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -1853,6 +1853,8 @@ doma_done:
d_printf(_("Adding the Guest user.\n"));
+ sid_compose(&sid, get_global_sam_sid(), DOMAIN_RID_GUEST);
+
pwd = getpwnam_alloc(tc, lp_guestaccount());
if (!pwd) {
@@ -1882,8 +1884,6 @@ doma_done:
}
}
- sid_compose(&sid, get_global_sam_sid(), DOMAIN_RID_GUEST);
-
dn = talloc_asprintf(tc, "uid=%s,%s", pwd->pw_name, lp_ldap_user_suffix ());
uidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_uid);
gidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_gid);