Commit Graph

402 Commits

Author SHA1 Message Date
Petr Spacek
34fc447c00 Add wait_for_dns option to default.conf.
This option makes record changes in DNS tree synchronous.
IPA calls will wait until new data are visible over DNS protocol
or until timeout.

It is intended only for testing. It should prevent tests from
failing if there is bigger delay between changes in LDAP and DNS.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-04-04 11:56:34 +02:00
Martin Kosek
66fb4d5e84 Make ipa-client-automount backwards compatible
ipa-client-automount calls automountlocation-show command during the
process. Unfortunately, FreeIPA commands are forward compatible only
and thus fail the installer.

Similarly to ipa-client-install, call XML-RPC interface directly
with version fixed to 2.0 (command was already available at that
version) to fix the failure.

https://fedorahosted.org/freeipa/ticket/4290

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2014-04-02 08:11:36 +02:00
Jan Cholasta
fea7163e87 Move CACERT definition to a single place.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Gabe
1f4869a3fa Fix order of synchronizing time when running ipa-client-install
When running ipa-client-install, it asks for user name, synchronizes time, then asks for user password
which the order could be confusing to some users. This changes ipa-client-install to synchronize time
before prompting for user kerberos authentication.

https://fedorahosted.org/freeipa/ticket/3957

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-20 10:58:09 +01:00
Tomas Babej
6b94f959a4 man: sshd should be run at least once before client enrollment
If SSH keys have not been generated prior to enrolling the client to the
IPA server, they will not be uploaded to the server, since they're not
present. Clarify this issue in the man pages.

https://fedorahosted.org/freeipa/ticket/4055

Reviewed-By: Jan Pazdziora <jpazdziora@redhat.com>
2014-03-05 12:47:47 +01:00
Ana Krivokapic
f67268db68 Improve error message on failed Kerberos authentication
When ipa client installation fails due to failed Kerberos authentication,
make sure that the message about the failed authentication is displayed last.
This makes it clear to the user that this was the reason for failed
installation.

https://fedorahosted.org/freeipa/ticket/3573

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-02-18 16:37:07 +01:00
Gabe
96003a45a1 ipa-join usage instructions are incorrect
Parameter -s for ipa-join has hostame instead of hostname

https://fedorahosted.org/freeipa/ticket/3250

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2014-02-18 09:40:46 +01:00
Nathaniel McCallum
5c299758b9 Enable building in C99 mode
C99 is supported on all compilers we target and
provides some useful features, including:
  * Standard struct initializers
  * Compound literals
  * For-loop declarations
  * Standard bool type
  * Variable arrays (use with caution)
  * Too many others to mention...

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2014-02-14 16:03:24 +01:00
Martin Kosek
e218f282a0 ntpconf: remove redundant comment
https://fedorahosted.org/freeipa/ticket/4094
2014-01-24 14:40:22 +01:00
Jan Cholasta
923e9d8bed Fix ntpd config on clients.
https://fedorahosted.org/freeipa/ticket/4094
2014-01-24 13:01:32 +01:00
Jan Cholasta
e369e3dcad Fix ipa-client-automount uninstall when fstore is empty.
https://fedorahosted.org/freeipa/ticket/4091
2014-01-15 12:10:05 +01:00
Ana Krivokapic
367c130185 Make sure state of services is preserved after client uninstall
IPA client installation did not preserve the status of nscd and nslcd services
correctly. E.g. nscd would be started after uninstallation, even though it
wasn't running before client installation. Make sure the state of services is
saved before installation and correctly restored after uninstallation.

https://fedorahosted.org/freeipa/ticket/3790
2014-01-14 09:28:39 +01:00
Xiao-Long Chen
5e96fbc22a Use /usr/bin/python2
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori@redhat.com
2014-01-03 09:46:05 +01:00
Tomas Babej
89ab877c5c ipa-client-install: Always pass hostname to the ipa-join
The ipa-client-install script and ipa-join use different methods
of resolving the hostname, the former uses gethostbyaddr() call,
while the latter reads the "uinfo.nodename".

This can result ipa-client-install failures in case of broken PTR
records.

https://fedorahosted.org/freeipa/ticket/4027
2013-12-09 13:34:39 +01:00
Martin Kosek
9677308caa Allow kernel keyring CCACHE when supported
Server and client installer should allow kernel keyring ccache when
supported.

https://fedorahosted.org/freeipa/ticket/4013
2013-12-09 12:21:22 +01:00
Jan Cholasta
5e2f7b68f0 Remove CFLAGS duplication.
https://fedorahosted.org/freeipa/ticket/3896
2013-12-06 14:44:41 +01:00
Petr Viktorin
1e836d2d0c Switch client to JSON-RPC
Modify ipalib.rpc to support JSON-RPC in addition to XML-RPC.
This is done by subclassing and extending xmlrpclib, because
our existing code relies on xmlrpclib internals.

The URI to use is given in the new jsonrpc_uri env variable. When
it is not given, it is generated from xmlrpc_uri by replacing
/xml with /json.

The rpc_json_uri env variable existed before, but was unused,
undocumented and not set the install scripts.
This patch removes it in favor of jsonrpc_uri (for consistency
with xmlrpc_uri).

Add the rpc_protocol env variable to control the protocol
IPA uses. rpc_protocol defaults to 'jsonrpc', but may be changed
to 'xmlrpc'.
Make backend.Executioner and tests use the backend specified by
rpc_protocol.

For compatibility with unwrap_xml, decoding JSON now gives tuples
instead of lists.

Design: http://freeipa.org/page/V3/JSON-RPC
Ticket: https://fedorahosted.org/freeipa/ticket/3299
2013-11-26 16:59:59 +01:00
Tomas Babej
4a0e91449e ipa-client-install: Publish CA certificate to systemwide store
During the installation, copy the CA certificate to the systemwide
store (/etc/pki/ca-trust/source/anchors/ipa-ca.crt) and update the
systemwide CA database.

This allows browsers to access IPA WebUI without warning out of the
box.

https://fedorahosted.org/freeipa/ticket/3504
2013-11-20 13:15:38 +01:00
Martin Basti
e8fc70f149 Removed old firefox configuration scripts
Part of ticket https://fedorahosted.org/freeipa/ticket/3821
2013-11-15 13:30:39 +01:00
Martin Basti
478dc1e828 ipa-client-install: Added options to configure firefox
Option --configure-firefox configures firefox to use Kerberos
credentials within IPA domain
Optional option --firefox-dir=DIR allows to user to specify non-standard
path where firefox install directory is placed.

Part of ticket: https://fedorahosted.org/freeipa/ticket/3821
2013-11-15 13:30:39 +01:00
Jan Cholasta
df5f4ee81d Turn LDAPEntry.single_value into a dictionary-like property.
This change makes single_value consistent with the raw property.

https://fedorahosted.org/freeipa/ticket/3521
2013-11-05 13:56:55 +01:00
Martin Kosek
7d341937ff Add nsswitch.conf to FILES section of ipa-client-install man page
This file is always updated when client is installed or uninstalled.

https://fedorahosted.org/freeipa/ticket/3995
2013-10-29 17:57:00 +01:00
Ana Krivokapic
c518a80ab7 Do not roll back failed client installation on server
In case of a failed enrollment, IPA client rolls back any changes it has made
to the system. In order to have a more debuggable setup, do not roll back these
changes in the case of an IPA server install.

https://fedorahosted.org/freeipa/ticket/3990
2013-10-25 14:00:05 +02:00
Martin Basti
c49cf9572a Added warning if cert '/etc/ipa/ca.crt' exists
https://fedorahosted.org/freeipa/ticket/3944
2013-10-16 10:55:23 +02:00
Petr Viktorin
5824a0e14e ipa-client-install: Verify RPC connection with a ping
With old servers, it is possible that xmlclient.connect() succeeds
but commands fail with a Kerberos error.

Verify that commands succeed by sending a ping after connecting.

Follow-up to: https://fedorahosted.org/freeipa/ticket/3931
2013-10-04 15:33:58 +02:00
Petr Viktorin
e01a28b584 ipa-client-install: Use direct RPC instead of api.Command
To make sure the installation works with older servers,
use XML-RPC directly, with a version set explicitly so the request
is not rejected.

RPC was chosen over ldapmodify, because going through the API allows
the server to process the request properly, or even cleanly reject
it if there are incompatible changes in future versions.

https://fedorahosted.org/freeipa/ticket/3931
2013-10-04 15:33:58 +02:00
Martin Kosek
7d2d1cb59d Do not set DNS discovery domain in server mode
In server mode, the discovery domain should be left unset in all
cases as the DNS discovery is only driven by the AD domains.

https://fedorahosted.org/freeipa/ticket/3947
2013-10-03 15:22:09 +02:00
Tomas Babej
316a9c2159 Use getent admin@domain for nss check in ipa-client-install
Use 'getent admin@domain' rather than 'getent admin@REALM' to check if nss
is working properly since admin@REALM check fails in case the domain and the realm
name does not match.

https://fedorahosted.org/freeipa/ticket/3906
2013-09-20 09:56:27 +02:00
Ana Krivokapic
66242e6ab0 Fix invocations of FileError in ipa-client-install
Some of the FileErrors in ipa-client-install were raised incorrectly
(without the 'reason' argument), which resulted in bad error messages
during ipa-client-install.

https://fedorahosted.org/freeipa/ticket/3758
2013-09-09 14:20:17 +02:00
Ana Krivokapic
28144e358c Replace ntpdate calls with ntpd
Due to the upcoming deprecation of the ntpdate program (targeted for Fedora 20),
replace ntpdate calls with ntpd.

https://fedorahosted.org/freeipa/ticket/3797
2013-09-09 13:37:32 +02:00
Petr Viktorin
85b974d1bc Remove __all__ specifications in ipaclient and ipaserver.install
The __all__ list does not cause submodules to be imported, e.g.
one would still have to `import ipaclient.ipachangeconf` rather than
just `import ipaclient` to use `ipaclient.ipachangeconf`.

Even if they did do anything, the lists were incomplete, and (since
`import *` is not used on these modules) unnecessary.

Pylint 1.0 reports undeclared names in __all__ as a warning.
2013-09-06 15:42:33 +02:00
Ana Krivokapic
95483d3b9f Add option to ipa-client-install to configure automount
Add the --automount-location option to ipa-client-install. If the option is
used, ipa-client-automount is called at the end of ipa-client-install.

https://fedorahosted.org/freeipa/ticket/3740
2013-09-05 12:43:52 +02:00
Martin Kosek
b9ec4d1a67 Prevent *.pyo and *.pyc multilib problems
Differences in the python byte code fails in a build validation
(rpmdiff) done on difference architecture of the same package.

This patch:
 1) Ensures that timestamps of generated *.pyo and *.pyc files match
 2) Python integer literals greater or equal 2^32 and lower than 2^64
    are converted to long right away to prevent different type of
    the integer on architectures with different size of int

https://fedorahosted.org/freeipa/ticket/3858
2013-08-13 15:31:46 +02:00
Tomas Babej
3bb6d38308 Improve help entry for ipa host
Updates old information produced by the ipa help host command.
Also adds a section to ipa-client-install manpage about client
re-enrollment.

https://fedorahosted.org/freeipa/ticket/3820
2013-08-06 12:31:16 +02:00
Tomas Babej
8a41b64a8c Change shebang to absolute path in ipa-client-automount
https://fedorahosted.org/freeipa/ticket/3811
2013-07-25 15:27:37 +02:00
Ana Krivokapic
8a22bce242 Use admin@REALM when testing if SSSD is ready
https://fedorahosted.org/freeipa/ticket/3771
2013-07-19 12:37:43 +02:00
Petr Viktorin
efb7a2d54d ipa-client: Use "ipa" as the package name for i18n
IPA uses "ipa" as the "package name" for all translations,
even in the ipa-client package.

https://fedorahosted.org/freeipa/ticket/3695
2013-07-19 12:26:28 +02:00
Ana Krivokapic
595de183a7 Add 'ipa_server_mode' option to SSSD configuration
https://fedorahosted.org/freeipa/ticket/3652
2013-07-18 17:49:23 +02:00
Nathaniel McCallum
784f484cad Fix client install exception if /etc/ssh is missing
https://fedorahosted.org/freeipa/ticket/3766
2013-07-09 12:07:25 -04:00
Jan Cholasta
736dd0fcd6 Do not skip SSSD known hosts in ipa-client-install --ssh-trust-dns.
https://fedorahosted.org/freeipa/ticket/3705
2013-06-27 08:48:40 +02:00
Martin Kosek
77ae4da706 Remove entitlement support
Entitlements code was not tested nor supported upstream since
version 3.0. Remove the associated code.

https://fedorahosted.org/freeipa/ticket/3739
2013-06-26 14:11:42 +02:00
Ana Krivokapic
caf40e76cd Improve handling of options in ipa-client-install
Improve handling of command line options related to forced client re-enrollment
in ipa-client-install:

* Make --keytab and --principal options mutually exclusive.
* Warn that using --force-join together with --keytab provides no additional
  functionality.

https://fedorahosted.org/freeipa/ticket/3686
2013-06-20 12:24:01 +02:00
Petr Spacek
9fbdf9f51f ipa-client-install: Add 'debug' and 'show' statements to nsupdate commands
https://fedorahosted.org/freeipa/ticket/3629
2013-05-22 12:29:47 +02:00
Rob Crittenden
bfdcc7c62d Drop uniqueMember mapping with nss-pam-ldapd.
nss-pam-ldapd in 0.8.4 changed the default to map uniqueMember to
member so it is no longer needed in the config file, and in fact
causes an error to be raised.

Add a Conflicts on older versions.

https://fedorahosted.org/freeipa/ticket/3589
2013-05-02 10:43:10 -04:00
Jan Cholasta
ddd8988f1c Add support for OpenSSH 6.2.
Run sss_ssh_authorizedkeyscommand as nobody. Automatically update sshd_config
on openssh-server update.

https://fedorahosted.org/freeipa/ticket/3571
2013-04-30 11:05:39 -04:00
Tomas Babej
5d6a9d3bef Preserve already configured options in openldap conf
We should respect already configured options present in
/etc/openldap/ldap.conf when generating our own configuration.

With this patch, we only rewrite URI, BASE and TLS_CACERT options
only if they are not configured. In the case they are, our suggested
configuration is inserted as a comment.

Also adds tab as a delimeter character in /etc/openldap/ldap.conf

https://fedorahosted.org/freeipa/ticket/3582
2013-04-30 10:54:10 -04:00
Tomas Babej
40966cbe63 Avoid removing sss from nssswitch.conf during client uninstall
This patch makes sure that sss is not removed from nsswitch.conf
which causes probles with later uses of sssd. Makes sure that
authconfig with --disablesssd option is not executed during
ipa client uninstall.

https://fedorahosted.org/freeipa/ticket/3577
2013-04-23 16:14:25 -04:00
Tomas Babej
6e8d311dac Add hint message about --force-join option when enrollment fails
When client enrollment fails due to the fact that host entry
already exists on the server, display an message informing the
user about the possibility of using --force-join option.

https://fedorahosted.org/freeipa/ticket/3572
2013-04-23 16:11:31 -04:00
Ana Krivokapic
2a8f1b0b16 Handle missing /etc/ipa in ipa-client-install
Make sure /etc/ipa is created and owned by freeipa-python package.

Report correct error to user if /etc/ipa is missing during client installation.

https://fedorahosted.org/freeipa/ticket/3551
2013-04-19 10:57:07 -04:00
Petr Viktorin
006ab23c6d Remove obsolete self-sign references from man pages, docstrings, comments
Part of the work for https://fedorahosted.org/freeipa/ticket/3494
2013-04-15 16:56:06 -04:00