Warn when setting UID/GID without idmap_ldb:use rfc2307 = Yes
authorAlexander Wuerstlein <arw@arw.name>
Sun, 30 Sep 2012 02:32:01 +0000 (04:32 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 18 Oct 2012 07:51:35 +0000 (09:51 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Oct 18 09:51:35 CEST 2012 on sn-devel-104

source4/scripting/python/samba/netcmd/user.py

index 9472cd1d14ee3fce536411fdc47a53e005bd35f5..9bb232b5509363afdd7c486b1f9028621032d8bf 100644 (file)
@@ -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)