Bug 1217439

Summary: accountsservice.service should be loaded after nss-user-lookup.target
Product: Red Hat Enterprise Linux 7 Reporter: Siteshwar Vashisht <svashisht>
Component: accountsserviceAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: accountsservice-0.6.35-9.el7 Doc Type: Bug Fix
Doc Text:
Cause: Insufficient ordering constraints in start up services cause accountsservice to access users from nsswitch before nsswitch is fully available. Consequence: autologin may malfunction at start up if it's configured for a network user account. Fix: Ensure correct ordering of the accountsservice with nsswitch services by using an Before=nss-user-lookup.target in the accountsservice systemd unit file Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 08:28:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Siteshwar Vashisht 2015-04-30 11:16:13 UTC
Description of problem:
accountsservice.service should be loaded after nss-user-lookup.target

If a gdm autologin user is authenticated using NIS and has it's home directory on NFS, it's '/var/lib/AccountsService/users/$USER' file gets overwritten on reboot. This issue was worked around by using below config file :

# cat /etc/systemd/system/accounts-daemon.service.d/nis-order-fix.conf
[Unit]
After=ypbind.service
After=nss-user-lookup.target
Wants=nss-user-lookup.target

Version-Release number of selected component (if applicable):
accountsservice-0.6.35-7.el7.x86_64

How reproducible:
Always

Additional info:
Upstream patch at http://cgit.freedesktop.org/accountsservice/commit/?id=3d6d125917073b06849c336c93e475a5a43c0dd9

Comment 1 Ray Strode [halfline] 2015-04-30 21:11:47 UTC
note if we don't fix ypbind, to get started before nss-user-lookup.target then we'll need to have After=ypbind.service as well (like mentioned in the workaround in comment 0).

Comment 2 Ray Strode [halfline] 2015-06-04 14:06:47 UTC
accountsservice is on the ACL now so devack+

Comment 7 errata-xmlrpc 2015-11-19 08:28:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2157.html