ubuntu 中 freeipa 客户端安装

ubuntu 中 freeipa 客户端安装

我正在 ubuntu VM 中安装 freeipa 客户端,但出现以下错误。

failed to obtain host tgt: major (458752): no credentials were supplied, or the credentials were unavailable or inaccessible, minor (2529639107): no credentials cache found

安装命令:

ipa-client-install \
  -U \
  --domain="example.prv" \
  --force \
  --force-join \
  --hostname="bastion.example.prv" \
  --mkhomedir \
  --nisdomain="example.prv" \
  --realm="EXAMPLE.PRV" \
  --password=PASSWORD \
  --principal=host-enrollment-global-user \
  --server="internal-hosting-freeipa-01.example.prv"

freeipa 服务器的流量内部托管-freeipa-01.example.prv在端口 88、80、389 和 464 上打开

我发现其他帖子也有类似的错误,但无法理解此问题的解决方法。

/var/log/ipaclient-install.log

023-09-27T18:54:15Z DEBUG Logging to /var/log/ipaclient-install.log
2023-09-27T18:54:15Z DEBUG ipa-client-install was invoked with arguments [] and options: {'unattended': True, 'principal': 'host-enrollment-global-user', 'prompt_password': False, 'on_master': False, 'ca_cert_files': None, 'force': True, 'configure_firefox': False, 'firefox_dir': None, 'keytab': None, 'mkhomedir': True, 'force_join': True, 'ntp_servers': None, 'ntp_pool': None, 'no_ntp': False, 'force_ntpd': False, 'nisdomain': 'example.prv', 'no_nisdomain': False, 'ssh_trust_dns': False, 'no_ssh': False, 'no_sshd': False, 'no_sudo': False, 'no_dns_sshfp': False, 'kinit_attempts': None, 'request_cert': False, 'ip_addresses': None, 'all_ip_addresses': False, 'fixed_primary': False, 'permit': False, 'enable_dns_updates': False, 'no_krb5_offline_passwords': False, 'preserve_sssd': False, 'automount_location': None, 'domain_name': 'example.prv', 'servers': ['internal-hosting-freeipa-01.example.prv'], 'realm_name': 'example.PRV', 'host_name': 'faye-bastion-test.example.prv', 'verbose': False, 'quiet': False, 'log_file': None, 'uninstall': False}
2023-09-27T18:54:15Z DEBUG IPA version 4.9.8
2023-09-27T18:54:15Z DEBUG IPA platform debian
2023-09-27T18:54:15Z DEBUG IPA os-release Ubuntu 22.04.2 LTS (Jammy Jellyfish)
2023-09-27T18:54:15Z DEBUG Starting external process
2023-09-27T18:54:15Z DEBUG args=['/usr/sbin/selinuxenabled']
2023-09-27T18:54:15Z DEBUG Process execution failed
2023-09-27T18:54:15Z DEBUG Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index'
2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Starting external process
2023-09-27T18:54:15Z DEBUG args=['sudo', '-V']
2023-09-27T18:54:15Z DEBUG Process finished, return code=0
2023-09-27T18:54:15Z DEBUG stdout=Sudo version 1.9.9
Configure options: --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking -v --with-all-insults --with-pam --with-pam-login --with-fqdn --with-logging=syslog --with-logfac=authpriv --with-env-editor --with-editor=/usr/bin/editor --with-exampledir=/usr/share/doc/sudo/examples --with-timeout=15 --with-password-timeout=0 --with-passprompt=[sudo] password for %p:  --disable-root-mailer --with-sendmail=/usr/sbin/sendmail --with-rundir=/run/sudo --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu --enable-zlib=system --with-selinux --with-linux-audit --enable-tmpfiles.d=yes --without-lecture --with-tty-tickets --enable-admin-flag
Sudoers policy plugin version 1.9.9
Sudoers file grammar version 48

Sudoers path: /etc/sudoers
Authentication methods: 'pam'
Syslog facility if syslog is being used for logging: authpriv
Syslog priority to use when user authenticates successfully: notice
Syslog priority to use when user authenticates unsuccessfully: alert
Send mail if user authentication fails
Send mail if the user is not in sudoers
Lecture user the first time they run sudo
Require users to authenticate by default
Root may run sudo
Allow some information gathering to give useful error messages
Require fully-qualified hostnames in the sudoers file
Visudo will honor the EDITOR environment variable
Set the LOGNAME and USER environment variables
Length at which to wrap log file lines (0 for no wrap): 80
Authentication timestamp timeout: 15.0 minutes
Password prompt timeout: 0.0 minutes
Number of tries to enter a password: 3
Umask to use or 0777 to use user's: 022
Path to mail program: /usr/sbin/sendmail
Flags for mail program: -t
Address to send mail to: root
Subject line for mail messages: *** SECURITY information for %h ***
Incorrect password message: Sorry, try again.
Path to lecture status dir: /var/lib/sudo/lectured
Path to authentication timestamp dir: /run/sudo/ts
Default password prompt: [sudo] password for %p:
Default user to run commands as: root
Value to override user's $PATH with: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Path to the editor for use by visudo: /usr/bin/editor
When to require a password for 'list' pseudocommand: any
When to require a password for 'verify' pseudocommand: all
File descriptors >= 3 will be closed before executing a command
Reset the environment to a default set of variables
Environment variables to check for safety:
        TZ
        TERM
        LINGUAS
        LC_*
        LANGUAGE
        LANG
        COLORTERM
Environment variables to remove:
        *=()*
        RUBYOPT
        RUBYLIB
        PYTHONUSERBASE
        PYTHONINSPECT
        PYTHONPATH
        PYTHONHOME
        TMPPREFIX
        ZDOTDIR
        READNULLCMD
        NULLCMD
        FPATH
        PERL5DB
        PERL5OPT
        PERL5LIB
        PERLLIB
        PERLIO_DEBUG
        JAVA_TOOL_OPTIONS
        SHELLOPTS
        BASHOPTS
        GLOBIGNORE
        PS4
        BASH_ENV
        ENV
        TERMCAP
        TERMPATH
        TERMINFO_DIRS
        TERMINFO
        _RLD*
        LD_*
        PATH_LOCALE
        NLSPATH
        HOSTALIASES
        RES_OPTIONS
        LOCALDOMAIN
        CDPATH
        IFS
Environment variables to preserve:
        XDG_CURRENT_DESKTOP
        XAUTHORIZATION
        XAUTHORITY
        PS2
        PS1
        PATH
        LS_COLORS
        KRB5CCNAME
        HOSTNAME
        DPKG_COLORS
        DISPLAY
        COLORS
Locale to use while parsing sudoers: C
Compress I/O logs using zlib
Always run commands in a pseudo-tty
Directory in which to store input/output logs: /var/log/sudo-io
File in which to store the input/output log: %{seq}
Add an entry to the utmp/utmpx file when allocating a pty
PAM service name to use: sudo
PAM service name to use for login shells: sudo-i
Attempt to establish PAM credentials for the target user
Create a new PAM session for the command to run in
Perform PAM account validation management
Enable sudoers netgroup support
Check parent directories for writability when editing files with sudoedit
Allow commands to be run even if sudo cannot write to the audit log
Allow commands to be run even if sudo cannot write to the log file
Log entries larger than this value will be split into multiple syslog messages: 960
File mode to use for the I/O log files: 0600
Execute commands by file descriptor instead of by path: digest_only
Type of authentication timestamp record: tty
Ignore case when matching user names
Ignore case when matching group names
Log when a command is allowed by sudoers
Log when a command is denied by sudoers
Sudo log server timeout in seconds: 30
Enable SO_KEEPALIVE socket option on the socket connected to the logserver
Verify that the log server's certificate is valid
Set the pam remote user to the user running sudo
The format of logs to produce: sudo
Enable SELinux RBAC support
Path to the file that is created the first time sudo is run: ~/.sudo_as_admin_successful
The largest size core dump file that may be created (in bytes): 0,0

Local IP address and netmask pairs:
        10.9.128.149/255.255.240.0
        fe80::bf:a8ff:fe56:bb1f/ffff:ffff:ffff:ffff::

Sudoers I/O plugin version 1.9.9
Sudoers audit plugin version 1.9.9

2023-09-27T18:54:15Z DEBUG stderr=
2023-09-27T18:54:15Z DEBUG Deleting invalid keytab: '/etc/krb5.keytab'.
2023-09-27T18:54:15Z WARNING Using existing certificate '/etc/ipa/ca.crt'.
2023-09-27T18:54:15Z DEBUG [IPA Discovery]
2023-09-27T18:54:15Z DEBUG Starting IPA discovery with domain=example.prv, servers=['internal-hosting-freeipa-01.example.prv'], hostname=faye-bastion-test.example.prv
2023-09-27T18:54:15Z DEBUG Server and domain forced
2023-09-27T18:54:15Z DEBUG [Kerberos realm search]
2023-09-27T18:54:15Z DEBUG Kerberos realm forced
2023-09-27T18:54:15Z DEBUG [LDAP server check]
2023-09-27T18:54:15Z DEBUG Verifying that internal-hosting-freeipa-01.example.prv (realm example.PRV) is an IPA server
2023-09-27T18:54:15Z DEBUG Init LDAP connection to: ldap://internal-hosting-freeipa-01.example.prv:389
2023-09-27T18:54:15Z DEBUG Search LDAP server for IPA base DN
2023-09-27T18:54:15Z DEBUG Check if naming context 'dc=example,dc=prv' is for IPA
2023-09-27T18:54:15Z DEBUG Naming context 'dc=example,dc=prv' is a valid IPA context
2023-09-27T18:54:15Z DEBUG Search for (objectClass=krbRealmContainer) in dc=example,dc=prv (sub)
2023-09-27T18:54:15Z DEBUG Found: cn=example.PRV,cn=kerberos,dc=example,dc=prv
2023-09-27T18:54:15Z DEBUG Discovery result: Success; server=internal-hosting-freeipa-01.example.prv, domain=example.prv, kdc=internal-hosting-freeipa-01.example.prv, basedn=dc=example,dc=prv
2023-09-27T18:54:15Z DEBUG Validated servers: internal-hosting-freeipa-01.example.prv
2023-09-27T18:54:15Z DEBUG will use discovered domain: example.prv
2023-09-27T18:54:15Z DEBUG Using servers from command line, disabling DNS discovery
2023-09-27T18:54:15Z DEBUG will use provided server: internal-hosting-freeipa-01.example.prv
2023-09-27T18:54:15Z DEBUG will use discovered realm: example.PRV
2023-09-27T18:54:15Z DEBUG will use discovered basedn: dc=example,dc=prv
2023-09-27T18:54:15Z INFO Client hostname: faye-bastion-test.example.prv
2023-09-27T18:54:15Z DEBUG Hostname source: Provided as option
2023-09-27T18:54:15Z INFO Realm: example.PRV
2023-09-27T18:54:15Z DEBUG Realm source: Discovered from LDAP DNS records in internal-hosting-freeipa-01.example.prv
2023-09-27T18:54:15Z INFO DNS Domain: example.prv
2023-09-27T18:54:15Z DEBUG DNS Domain source: Forced
2023-09-27T18:54:15Z INFO IPA Server: internal-hosting-freeipa-01.example.prv
2023-09-27T18:54:15Z DEBUG IPA Server source: Provided as option
2023-09-27T18:54:15Z INFO BaseDN: dc=example,dc=prv
2023-09-27T18:54:15Z DEBUG BaseDN source: From IPA server ldap://internal-hosting-freeipa-01.example.prv:389
2023-09-27T18:54:15Z DEBUG Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index'
2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Saving StateFile to '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Starting external process
2023-09-27T18:54:15Z DEBUG args=['/usr/sbin/ipa-rmkeytab', '-k', '/etc/krb5.keytab', '-r', 'example.PRV']
2023-09-27T18:54:15Z DEBUG Process finished, return code=7
2023-09-27T18:54:15Z DEBUG stdout=
2023-09-27T18:54:15Z DEBUG stderr=Failed to set cursor 'No such file or directory'

2023-09-27T18:54:15Z DEBUG Backing up system configuration file '/etc/hostname'
2023-09-27T18:54:15Z DEBUG   -> Not backing up - already have a copy of '/etc/hostname'
2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Saving StateFile to '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Starting external process
2023-09-27T18:54:15Z DEBUG args=['/usr/bin/hostnamectl', 'set-hostname', 'faye-bastion-test.example.prv']
2023-09-27T18:54:15Z DEBUG Process finished, return code=0
2023-09-27T18:54:15Z DEBUG stdout=
2023-09-27T18:54:15Z DEBUG stderr=
2023-09-27T18:54:15Z DEBUG Starting external process
2023-09-27T18:54:15Z DEBUG args=['/usr/sbin/service', 'ntp', 'status', '']
2023-09-27T18:54:15Z DEBUG Process finished, return code=4
2023-09-27T18:54:15Z DEBUG stdout=
2023-09-27T18:54:15Z DEBUG stderr=Unit ntp.service could not be found.

2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Saving StateFile to '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Saving StateFile to '/var/lib/ipa-client/sysrestore/sysrestore.state'
2023-09-27T18:54:15Z DEBUG Search DNS for SRV record of _ntp._udp.example.prv
2023-09-27T18:54:16Z DEBUG DNS record not found: NXDOMAIN
2023-09-27T18:54:16Z INFO Synchronizing time
2023-09-27T18:54:16Z WARNING No SRV records of NTP servers found and no NTP server or pool address was provided.
2023-09-27T18:54:16Z DEBUG Starting external process
2023-09-27T18:54:16Z DEBUG args=['/bin/systemctl', 'enable', 'chrony.service']
2023-09-27T18:54:17Z DEBUG Process finished, return code=0
2023-09-27T18:54:17Z DEBUG stdout=
2023-09-27T18:54:17Z DEBUG stderr=Synchronizing state of chrony.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable chrony

2023-09-27T18:54:17Z DEBUG Starting external process
2023-09-27T18:54:17Z DEBUG args=['/bin/systemctl', 'restart', 'chrony.service']
2023-09-27T18:54:17Z DEBUG Process finished, return code=0
2023-09-27T18:54:17Z DEBUG stdout=
2023-09-27T18:54:17Z DEBUG stderr=
2023-09-27T18:54:17Z DEBUG Starting external process
2023-09-27T18:54:17Z DEBUG args=['/bin/systemctl', 'is-active', 'chrony.service']
2023-09-27T18:54:17Z DEBUG Process finished, return code=0
2023-09-27T18:54:17Z DEBUG stdout=active

2023-09-27T18:54:17Z DEBUG stderr=
2023-09-27T18:54:17Z DEBUG Restart of chrony.service complete
2023-09-27T18:54:17Z INFO Attempting to sync time with chronyc.
2023-09-27T18:54:17Z DEBUG Starting external process
2023-09-27T18:54:17Z DEBUG args=['/usr/bin/chronyc', '-d', 'waitsync', '4', '0', '0', '3']
2023-09-27T18:54:26Z DEBUG Process finished, return code=0
2023-09-27T18:54:26Z DEBUG stdout=try: 1, refid: 00000000, correction: 0.000000000, skew: 0.000
try: 2, refid: 00000000, correction: 0.000000000, skew: 0.000
try: 3, refid: 00000000, correction: 0.000000000, skew: 0.000
try: 4, refid: A9FEA97B, correction: 0.000011853, skew: 0.220

2023-09-27T18:54:26Z DEBUG stderr=
2023-09-27T18:54:26Z INFO Time synchronization was successful.
2023-09-27T18:54:26Z DEBUG Starting external process
2023-09-27T18:54:26Z DEBUG args=['/usr/sbin/selinuxenabled']
2023-09-27T18:54:26Z DEBUG Process execution failed
2023-09-27T18:54:26Z DEBUG Starting external process
2023-09-27T18:54:26Z DEBUG args=['/bin/keyctl', 'get_persistent', '@s', '0']
2023-09-27T18:54:26Z DEBUG Process finished, return code=0
2023-09-27T18:54:26Z DEBUG stdout=457935527

2023-09-27T18:54:26Z DEBUG stderr=
2023-09-27T18:54:26Z DEBUG Enabling persistent keyring CCACHE
2023-09-27T18:54:26Z DEBUG Writing Kerberos configuration to /tmp/tmpcgm__7ra:
2023-09-27T18:54:26Z DEBUG #File modified by ipa-client-install

includedir /etc/krb5.conf.d/
includedir /var/lib/sss/pubconf/krb5.include.d/

[libdefaults]
  default_realm = example.PRV
  dns_lookup_realm = false
  rdns = false
  dns_canonicalize_hostname = false
  dns_lookup_kdc = true
  ticket_lifetime = 24h
  forwardable = true
  udp_preference_limit = 0
  default_ccache_name = KEYRING:persistent:%{uid}


[realms]
  example.PRV = {
    kdc = internal-hosting-freeipa-01.example.prv:88
    master_kdc = internal-hosting-freeipa-01.example.prv:88
    admin_server = internal-hosting-freeipa-01.example.prv:749
    kpasswd_server = internal-hosting-freeipa-01.example.prv:464
    default_domain = example.prv
    pkinit_anchors = FILE:/var/lib/ipa-client/pki/kdc-ca-bundle.pem
    pkinit_pool = FILE:/var/lib/ipa-client/pki/ca-bundle.pem

  }


[domain_realm]
  .example.prv = example.PRV
  example.prv = example.PRV
  faye-bastion-test.example.prv = example.PRV



2023-09-27T18:54:26Z DEBUG Writing configuration file /tmp/tmpcgm__7ra
2023-09-27T18:54:26Z DEBUG #File modified by ipa-client-install

includedir /etc/krb5.conf.d/
includedir /var/lib/sss/pubconf/krb5.include.d/

[libdefaults]
  default_realm = example.PRV
  dns_lookup_realm = false
  rdns = false
  dns_canonicalize_hostname = false
  dns_lookup_kdc = true
  ticket_lifetime = 24h
  forwardable = true
  udp_preference_limit = 0
  default_ccache_name = KEYRING:persistent:%{uid}


[realms]
  example.PRV = {
    kdc = internal-hosting-freeipa-01.example.prv:88
    master_kdc = internal-hosting-freeipa-01.example.prv:88
    admin_server = internal-hosting-freeipa-01.example.prv:749
    kpasswd_server = internal-hosting-freeipa-01.example.prv:464
    default_domain = example.prv
    pkinit_anchors = FILE:/var/lib/ipa-client/pki/kdc-ca-bundle.pem
    pkinit_pool = FILE:/var/lib/ipa-client/pki/ca-bundle.pem

  }


[domain_realm]
  .example.prv = example.PRV
  example.prv = example.PRV
  faye-bastion-test.example.prv = example.PRV



2023-09-27T18:54:26Z DEBUG Initializing principal [email protected] using password
2023-09-27T18:54:26Z DEBUG Starting external process
2023-09-27T18:54:26Z DEBUG args=['/usr/bin/kinit', '[email protected]', '-c', '/tmp/krbcc8r0g0xlc/ccache']
2023-09-27T18:54:26Z DEBUG Process finished, return code=0
2023-09-27T18:54:26Z DEBUG stdout=Password for [email protected]:

2023-09-27T18:54:26Z DEBUG stderr=
2023-09-27T18:54:26Z DEBUG trying to retrieve CA cert via LDAP from internal-hosting-freeipa-01.example.prv
2023-09-27T18:54:26Z DEBUG retrieving schema for SchemaCache url=ldap://internal-hosting-freeipa-01.example.prv:389 conn=<ldap.ldapobject.SimpleLDAPObject object at 0x7f1128b128c0>
2023-09-27T18:54:26Z DEBUG Existing CA cert and Retrieved CA cert are identical
2023-09-27T18:54:26Z DEBUG Starting external process
2023-09-27T18:54:26Z DEBUG args=['/usr/sbin/ipa-join', '-s', 'internal-hosting-freeipa-01.example.prv', '-b', 'dc=example,dc=prv', '-h', 'faye-bastion-test.example.prv', '-k', '/etc/krb5.keytab', '-f']
2023-09-27T18:56:36Z DEBUG Process finished, return code=17
2023-09-27T18:56:36Z DEBUG stdout=
2023-09-27T18:56:36Z DEBUG stderr=
2023-09-27T18:56:36Z ERROR Joining realm failed:
2023-09-27T18:56:36Z INFO Use ipa-getkeytab to obtain a host principal for this server.
2023-09-27T18:56:36Z DEBUG Starting external process
2023-09-27T18:56:36Z DEBUG args=['/usr/bin/kdestroy']
2023-09-27T18:56:36Z DEBUG Process finished, return code=0
2023-09-27T18:56:36Z DEBUG stdout=
2023-09-27T18:56:36Z DEBUG stderr=
2023-09-27T18:56:36Z DEBUG Initializing principal host/[email protected] using keytab /etc/krb5.keytab
2023-09-27T18:56:36Z DEBUG using ccache /etc/ipa/.dns_ccache
2023-09-27T18:56:36Z INFO Please make sure the following ports are opened in the firewall settings:
     TCP: 80, 88, 389
     UDP: 88 (at least one of TCP/UDP ports 88 has to be open)
Also note that following ports are necessary for ipa-client working properly after enrollment:
     TCP: 464
     UDP: 464, 123 (if NTP enabled)
2023-09-27T18:56:36Z ERROR Failed to obtain host TGT: Major (458752): No credentials were supplied, or the credentials were unavailable or inaccessible, Minor (2529639107): No credentials cache found
2023-09-27T18:56:36Z WARNING Installation failed. Force set so not rolling back changes.
2023-09-27T18:56:36Z DEBUG   File "/usr/lib/python3/dist-packages/ipapython/admintool.py", line 180, in execute
    return_value = self.run()
  File "/usr/lib/python3/dist-packages/ipapython/install/cli.py", line 342, in run
    return cfgr.run()
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 360, in run
    return self.execute()
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 386, in execute
    for rval in self._executor():
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 431, in __runner
    exc_handler(exc_info)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 460, in _handle_execute_exception
    self._handle_exception(exc_info)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 450, in _handle_exception
    six.reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 421, in __runner
    step()
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 418, in <lambda>
    step = lambda: next(self.__gen)
  File "/usr/lib/python3/dist-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from
    six.reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from
    value = gen.send(prev_value)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 655, in _configure
    next(executor)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 431, in __runner
    exc_handler(exc_info)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 460, in _handle_execute_exception
    self._handle_exception(exc_info)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 518, in _handle_exception
    self.__parent._handle_exception(exc_info)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 450, in _handle_exception
    six.reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 515, in _handle_exception
    super(ComponentBase, self)._handle_exception(exc_info)
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 450, in _handle_exception
    six.reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 421, in __runner
    step()
  File "/usr/lib/python3/dist-packages/ipapython/install/core.py", line 418, in <lambda>
    step = lambda: next(self.__gen)
  File "/usr/lib/python3/dist-packages/ipapython/install/util.py", line 81, in run_generator_with_yield_from
    six.reraise(*exc_info)
  File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/ipapython/install/util.py", line 59, in run_generator_with_yield_from
    value = gen.send(prev_value)
  File "/usr/lib/python3/dist-packages/ipapython/install/common.py", line 65, in _install
    for unused in self._installer(self.parent):
  File "/usr/lib/python3/dist-packages/ipaclient/install/client.py", line 3949, in main
    install(self)
  File "/usr/lib/python3/dist-packages/ipaclient/install/client.py", line 2649, in install
    _install(options)
  File "/usr/lib/python3/dist-packages/ipaclient/install/client.py", line 2877, in _install
    raise ScriptError(rval=CLIENT_INSTALL_ERROR)

2023-09-27T18:56:36Z DEBUG The ipa-client-install command failed, exception: ScriptError:
2023-09-27T18:56:36Z ERROR The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information

解决方案 还需要向 freeipa 服务器开放端口 80,443,749。

答案1

日志文件中的输出和--nisdomain="example.prv"选项表明您的配置比您指示的要多。您实际上使用 NIS/NIS+ 吗? SELinux?

这是一个ipa-client-install在可以访问 Centos 7.6 FreeIPA 服务器的 Ubuntu 16.04 和 20.04 客户端上适用的命令:

ipa-client-install \
  --no-ntp \
  --unattended \
  --kinit-attempts=15 \
  --domain="${IPA_dns_domain}" \
  --server="${IPA_server_name}" \
  --principal="${IPA_username}" \
  --password="${IPA_password}"
  • 我的 IPA 服务器不是我的客户端的 NTP 服务器,因此我--no-ntp在安装命令中使用了。
  • 使用使--hostname安装命令尝试将 IPA 服务器的 DNS 域附加到我的客户端主机名,这在我的网络中不合适。省略该选项会使安装命令调用等效于hostname -f获取 FQDN。我建议尝试使用和不使用--hostname,看看哪种更适合您。
  • 安装命令假定 Kerberos 领域是 DNS 域的大写版本,因此--realm我不需要该选项。
  • 我的 Ubuntu 服务器使用 IPA 进行用户身份验证,使用 DNS 服务器进行 DNS 解析。根本就没有 NIS/NIS+,所以这个--nisdomain选项没有必要。
  • --principal和选项中的用户名和密码--password使用 IPA“服务”帐户,该帐户仅具有注册新主机的权限。 (“服务”帐户是我的团队对 IPA 用户帐户的术语,该帐户旨在供软件而不是人员使用,并且就我而言,属于具有不同密码过期策略的不同 IPA 组)

我不清楚为什么您的安装命令似乎通过 调用外部命令sudo -V

相关内容