Univention Bugzilla – Bug 34481
Need a primary group with samba option to create a user with samba option.
Last modified: 2018-01-22 20:05:13 CET
# udm users/user create --option samba --option kerberos --option person --option mail --set password=univention --set lastname=test9 --set username=test9 --set primaryGroup="cn=Domain Users,cn=groups,$(ucr get ldap/base)" Need a primary group with samba option to create a user with samba option. 1. "samba option" is repeated 2. is Samba requires that option, it should say so: # udm users/user | grep primaryGroup primaryGroup (c,posix) Primary group
Created attachment 7941 [details] patch 1. The message is okay: The primary group which you are setting must be a samba-group if you want the user to be a samba user. Maybe it can be formulated more clearly. 2. Patch attached.
*** Bug 30932 has been marked as a duplicate of this bug. ***
Created attachment 8394 [details] patch Stumbled on this again when writing UCS-test scripts. The patch adds also that the default primary is added if not given.
A better patch would be: --- modules/univention/admin/handlers/users/user.py (Revision 80932) +++ modules/univention/admin/handlers/users/user.py (Arbeitskopie) @@ -1882,7 +1882,7 @@ 'ldap': options['ldap_pwd'].short_description }) - if 'samba' in self.options and not self.lo.getAttr(self['primaryGroup'], 'sambaSID'): + if 'samba' in self.options and self['primaryGroup'] and not self.lo.getAttr(self['primaryGroup'], 'sambaSID'): raise univention.admin.uexceptions.primaryGroupWithoutSamba if 'posix' in self.options or 'samba' in self.options: This would allow to create users with samba option only. This user wouldn't be synced to S4 because it doesn't have a posixAccount object class. The user account is therefore useless. I think the best would be to wait until we unify the user options anyway and maybe just display a better error message that a samba user without posix option cannot be created.
This is obsolete since Bug #45842. *** This bug has been marked as a duplicate of bug 45842 ***