[PATCH 3/3] Warn when setting UID/GID without idmap_ldb:use rfc2307 = Yes

Alexander Wuerstlein snalwuer at cip.cs.fau.de
Sat Sep 29 20:32:01 MDT 2012


From: Alexander Wuerstlein <arw at arw.name>

---
 source4/scripting/python/samba/netcmd/user.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py
index 23fe110..0ea09e8 100644
--- a/source4/scripting/python/samba/netcmd/user.py
+++ b/source4/scripting/python/samba/netcmd/user.py
@@ -160,6 +160,10 @@ Example4 shows how to create a new user with Unix UID, GID and login-shell set f
         lp = sambaopts.get_loadparm()
         creds = credopts.get_credentials(lp)
 
+        if uid_number or gid_number:
+            if not lp.get("idmap_ldb:use rfc2307"):
+                self.outf.write("You are setting a Unix/RFC2307 UID or GID. You may want to set 'idmap_ldb:use rfc2307 = Yes' to use those attributes for XID/SID-mapping.\n")
+
         try:
             samdb = SamDB(url=H, session_info=system_session(),
                           credentials=creds, lp=lp)
-- 
1.7.2.5



More information about the samba-technical mailing list