Bug 36090 - samba-tool domain join: error: no such option: --keep-existing
samba-tool domain join: error: no such option: --keep-existing
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0
Assigned To: Arvid Requate
Felix Botner
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-07 18:25 CEST by Arvid Requate
Modified: 2016-12-14 11:49 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2014-10-07 18:25:39 CEST
Currently samba4.2RC1 is build without our patch for "--keep-existing" but the univention-samba4 joinscript still uses the opption, causing re-joins to fail:

samba-tool domain join: error: no such option: --keep-existing


We need to decide if we want to remove support for this option completely. I guess this is the direction we have chosen?
Comment 1 Stefan Gohmann univentionstaff 2014-10-10 08:44:41 CEST
(In reply to Arvid Requate from comment #0)
> We need to decide if we want to remove support for this option completely. I
> guess this is the direction we have chosen?

Do we get a problem with the behavior described in Bug #27886?
Comment 2 Arvid Requate univentionstaff 2014-10-20 19:19:58 CEST
> Do we get a problem with the behavior described in Bug #27886?

Yes, so I revived the old patch. It's not that complicated, originally consisting of three parts:

1. pass the --keep-existing option down through a series of function calls
2. don't delete an existing account and set the promote_existing flag instead
3. save and restore the rid pool and nextrid counter.

In the meantime we re-implemented the third part in the joinscript (Bug 34754), so I dropped that part of the patch.
Comment 3 Felix Botner univentionstaff 2014-11-05 13:24:25 CET
OK - after rejoining a slave the slave object has the same sid

-> samba-tool domain join --help| grep keep
  --keep-existing       keep the SID during join

UCS 4.0 master with s4-connector and slave with samba4

@master -> univention-ldapsearch uid=slave\$ | grep sambaSID
sambaSID: S-1-5-21-3368451619-3337328142-2787364250-1112

@master -> univention-s4search sAMAccountName=SLAVE\$ | grep objectSid
objectSid: S-1-5-21-3368451619-3337328142-2787364250-1112

@slave -> univention-join # (rejoin)

@master -> univention-ldapsearch uid=slave\$ | grep sambaSID
sambaSID: S-1-5-21-3368451619-3337328142-2787364250-1112

@master -> univention-s4search sAMAccountName=SLAVE\$ | grep objectSid
objectSid: S-1-5-21-3368451619-3337328142-2787364250-1112

OK - Changelog
Comment 4 Stefan Gohmann univentionstaff 2014-11-26 06:54:08 CET
UCS 4.0-0 has been released:
 http://docs.univention.de/release-notes-4.0-0-en.html
 http://docs.univention.de/release-notes-4.0-0-de.html

If this error occurs again, please use "Clone This Bug".