Bug 34481 - Need a primary group with samba option to create a user with samba option.
Need a primary group with samba option to create a user with samba option.
Status: RESOLVED DUPLICATE of bug 45842
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
: 30932 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-07 10:40 CEST by Philipp Hahn
Modified: 2018-01-22 20:05 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.017
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (713 bytes, patch)
2016-08-29 18:01 CEST, Florian Best
Details | Diff
patch (1.52 KB, patch)
2017-02-01 16:48 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-04-07 10:40:10 CEST
# 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
Comment 1 Florian Best univentionstaff 2016-08-29 18:01:55 CEST
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.
Comment 2 Florian Best univentionstaff 2016-09-07 17:54:57 CEST
*** Bug 30932 has been marked as a duplicate of this bug. ***
Comment 3 Florian Best univentionstaff 2017-02-01 16:48:43 CET
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.
Comment 4 Florian Best univentionstaff 2017-07-06 17:07:19 CEST
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.
Comment 5 Florian Best univentionstaff 2018-01-22 20:05:13 CET
This is obsolete since Bug #45842.

*** This bug has been marked as a duplicate of bug 45842 ***