Bug 32005 - univention-run-join with long join user DN might fail
univention-run-join with long join user DN might fail
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Join (univention-join)
UNSTABLE
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Philipp Hahn
Lukas Walter
: interim-1
: 30222 (view as bug list)
Depends on: 16210 32324
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-17 19:42 CEST by Philipp Hahn
Modified: 2020-07-06 19:08 CEST (History)
4 users (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): Cleanup
Max CVSS v3 score:


Attachments
Fix quoting in univention-run-join-scripts (4.27 KB, patch)
2013-07-17 19:42 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-07-17 19:42:57 CEST
Created attachment 5328 [details]
Fix quoting in univention-run-join-scripts

+++ This bug was initially created as a clone of Bug #16210 +++
One more:

/usr/sbin/univention-run-join-scripts:152
>                # Next check is the local ldapi interface
>                binddn="$(univention-ssh "$DCPWD" "$DCACCOUNT"@"$ldap_master" \
>                        ldapsearch -x LLL -H ldapi:/// "(&(uid=$DCACCOUNT)(objectClass=person))" dn | ldapsearch-decode64 | sed -ne 's|^dn: ||p;s|^DN: ||p')"

Notice that only ldapsearch-decode64 is used, but not ldapsearch-wrapper.
Notice the missing dash '-' before the 'LLL'!


There are also problems when the User Name contains blanks.

There are also problems when the DN of the Join-User contains blanks, for example when the user is in the "ou=Franktfurt am Main" container: Bug #24758


"univention-run-join-scripts" also breaks:
> Search LDAP binddn bash: -c 0: Syntaxfehler beim unerwartetet Word `('
> bash: -c: Zeile 0: `ldapsearch -x LLL -H ldapi:/// (&(uid=MyAdmin)(objectClass=person)) dn'
> No such object (32)
Comment 1 Philipp Hahn univentionstaff 2013-07-18 14:24:29 CEST
svn42573
univention-join_6.0.1-1.445.201307181423

svn42574: Several issues regarding handling long DNs and DNs containing non-alphanumeric characters in <command>univention-run-join-scripts</command> have been fixed
Comment 2 Lukas Walter univentionstaff 2013-08-21 12:55:51 CEST
Right now, this does not work with other users than "Administrator" at all.

For example:
========================================================
DN: uid=bofh,dc=ucs,dc=dev
ARG: None
  homedrive: None
  CtxKeyboardLayout: None
  disabled: none
  postcode: None
  CtxWFProfilePath: None
  CtxRASDialin: None
  title: None
  mailAlternativeAddress: None
  organisation: None
  CtxMaxIdleTime: None
  lastname: foobar
  employeeNumber: None
  password: {crypt}$6$VFHfDHnR.N4GAMyZ$Y88Tytt9GjoWsiriAq6g3fuxs/Ar7E0no38Z28nxpZXwPwH.xAM80iEDrWi1Eq0UREZU0luRftLFVEdbJrYYG.
  passwordexpiry: None
  sambaRID: 5028
  profilepath: None
  mobileTelephoneNumber: None
  sambahome: None
  CtxWFHomeDirDrive: None
  CtxCallback: None
  street: None
  CtxShadow: 00000000
  e-mail: None
  CtxWorkDirectory: None
  CtxNWLogonServer: None
  CtxMaxConnectionTime: None
  umcProperty: None
  homePostalAddress: None
  groups: cn=Domain Admins,cn=groups,dc=ucs,dc=dev
  overridePWHistory: None
  pwdChangeNextLogin: None
  secretary: None
  primaryGroup: cn=Domain Admins,cn=groups,dc=ucs,dc=dev
  CtxInitialProgram: None
  scriptpath: None
  sambaPrivileges: None
  city: None
  CtxStartprogramClient: 0
  pagerTelephoneNumber: None
  userexpiry: None
  sambaUserWorkstations: None
  username: bofh
  departmentNumber: None
  shell: /bin/bash
  CtxMinEncryptionLevel: None
  CtxCallbackNumber: None
  mailHomeServer: None
  CtxCfgFlags1: None
  phone: None
  gidNumber: 5000
  sambaLogonHours: None
  CtxBrokenSession: 0000
  locked: none
  CtxReconnectSession: 0000
  roomNumber: None
  homeShare: None
  gecos: foobar
  CtxCfgClientPrinters: 0
  jpegPhoto: None
  uidNumber: 2014
  employeeType: None
  homeSharePath: None
  CtxCfgPresent: None
  CtxWFHomeDir: None
  unixhome: /home/bofh
  homeTelephoneNumber: None
  description: None
  firstname: None
  birthday: None
  overridePWLength: None
  CtxMaxDisconnectionTime: None
  CtxCfgDefaultClientPrinters: 0
  displayName: foobar
  mailPrimaryAddress: None
  CtxCfgClientDrivers: 0
  CtxCfgTSLogon: 1


root@master200:~# univention-run-join-scripts --force --ask-pass
univention-run-join-scripts: runs all join scripts existing on local computer.
copyright (c) 2001-2013 Univention GmbH, Germany

Enter DC Master Account : bofh
Enter DC Master Password: 

Search LDAP binddn Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).


**************************************************************************
* Running join scripts failed!                                           *
**************************************************************************
* Message:  binddn for user bofh not found
**************************************************************************
==============================================================================
Comment 3 Lukas Walter univentionstaff 2013-08-22 10:41:12 CEST
Listener was not running.
Comment 4 Lukas Walter univentionstaff 2013-08-22 10:58:01 CEST
works with long DNs, uids containing umlauts and DNs with whitespaces.

changelog: ok
Comment 5 Stefan Gohmann univentionstaff 2013-11-19 06:41:27 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".
Comment 6 Arvid Requate univentionstaff 2020-07-06 19:08:41 CEST
*** Bug 30222 has been marked as a duplicate of this bug. ***