RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 674164 - sss_obfuscate fails if there's no domain named "default".
Summary: sss_obfuscate fails if there's no domain named "default".
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stephen Gallagher
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-31 20:16 UTC by Gowrishankar Rajaiyan
Modified: 2015-01-04 23:46 UTC (History)
6 users (show)

Fixed In Version: sssd-1.5.1-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 11:38:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0560 0 normal SHIPPED_LIVE Low: sssd security, bug fix, and enhancement update 2011-05-19 11:38:17 UTC

Description Gowrishankar Rajaiyan 2011-01-31 20:16:59 UTC
Description of problem:
sss_obfuscate fails if there's no domain named "default". 

Version-Release number of selected component (if applicable):
sssd-1.5.1-3.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Configure sssd.conf for a single domain. (check additional info for relevant sssd.conf)
2. Make sure domain name is not "default".
3. Execute "sss_obfuscate" to obfuscate password.


Actual results:

# sss_obfuscate 
Enter password: 
Re-enter password: 
No such domain default

Expected results:
Should check if there exists only one domain and assume the existing one domain as default. 

Additional info:

Relevant section of sssd.conf 
[domain/LDAP]
ldap_tls_reqcert = demand
auth_provider = ldap
ldap_search_base = dc=example,dc=com
id_provider = ldap
ldap_tls_cacert = /etc/openldap/cacerts/cacert.asc
debug_level = 9
ldap_uri = ldaps://sssdldap.redhat.com:636
enumerate = True
cache_credentials = True
ldap_tls_cacertdir = /etc/openldap/cacerts

Comment 1 Stephen Gallagher 2011-01-31 20:29:54 UTC
I'd just like one clarification here. There are active domains and inactive domains in SSSD.

An active domain is one that is configured in [domain/DOMAINNAME] and is also specified in the domains= line in the [sssd] section. An inactive domain is one that is configured in [domain/DOMAINNAME] but is NOT listed in the domains= line.

Under which situation do we assume that one is the default. Should it be only if there is exactly one domain (active or inactive) specified in sssd.conf, or should it be if there is exactly one active domain specified in the [sssd] section?

Also, what error message would you like to see when if we try to update sssd.conf without specifying a domain and there are two domains in play. Perhaps "Unable to determine default domain, please use -d <domain>"?

Comment 5 Gowrishankar Rajaiyan 2011-02-01 13:42:33 UTC
I would suggest for e.g. if we have DOMAIN1 and DOMAIN2

case1: [domain/DOMAIN1]
- DOMAIN1 is default domain.

case 2: [domain/DOMAIN2] and DOMAIN1 is inactive
- DOMAIN2 is default domain.
 
case 3: [domain/DOMAIN1,DOMAIN2]
- "Unable to determine default domain, please use -d <domain>"

Comment 6 Stephen Gallagher 2011-02-01 13:47:49 UTC
(In reply to comment #5)
Just trying to make sure I have this right:

> I would suggest for e.g. if we have DOMAIN1 and DOMAIN2
> 
> case1: [domain/DOMAIN1]
> - DOMAIN1 is default domain.
> 

There is only one domain (active or inactive) named DOMAIN1. In this case it's the default.

> case 2: [domain/DOMAIN2] and DOMAIN1 is inactive
> - DOMAIN2 is default domain.
> 

Multiple domains are available in the config file, but only one is active. In this case, the active domain is the default.

> case 3: [domain/DOMAIN1,DOMAIN2]
> - "Unable to determine default domain, please use -d <domain>"

Two domains are active, so we should force a command-line option.



I'm beginning to think that this isn't going to be easy to explain to a user. Perhaps we should just drop the "default" domain completely and always mandate the use of -d <domain>. Would that be an acceptable move? It seems like that would be the least-ambiguous approach.

Comment 7 Jenny Severance 2011-02-01 13:59:23 UTC
I think that makes sense to just make -d option required.  Then there isn't any question.

Comment 10 Gowrishankar Rajaiyan 2011-03-21 06:59:57 UTC
sss_obfuscate command now always mandate the use of -d <domain>.


# sss_obfuscate -h
Usage: sss_obfuscate [options]

sss_obfuscate converts a given password into
human-unreadable format and places it into
appropriate domain section of the SSSD config
file. The password can be passed in by stdin,
specified on the command-line or entered
interactively

Options:
  -h, --help            show this help message and exit
  -s, --stdin           Read the password from stdin.
  -d DOMNAME, --domain=DOMNAME
                        The domain to use the password in (mandatory)
  -f FILE, --file=FILE  Set input file to FILE (default: Use system default,
                        usually /etc/sssd/sssd.conf)

[root@pogolinux-2 ~]# sss_obfuscate -s < /tmp/pwd.txt 
No domain specified


# rpm -qi sssd | head
Name        : sssd                         Relocations: (not relocatable)
Version     : 1.5.1                             Vendor: Red Hat, Inc.
Release     : 14.el6                        Build Date: Wed 09 Mar 2011 02:30:12 PM EST
Install Date: Mon 21 Mar 2011 01:14:19 AM EDT      Build Host: x86-009.build.bos.redhat.com
Group       : Applications/System           Source RPM: sssd-1.5.1-14.el6.src.rpm
Size        : 3418526                          License: GPLv3+
Signature   : RSA/8, Thu 10 Mar 2011 11:27:42 AM EST, Key ID 938a80caf21541eb
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://fedorahosted.org/sssd/
Summary     : System Security Services Daemon

Comment 11 errata-xmlrpc 2011-05-19 11:38:27 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0560.html

Comment 12 errata-xmlrpc 2011-05-19 13:09:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0560.html


Note You need to log in before you can comment on or make changes to this bug.