Bug 1317773

Summary: Regression: lastlog no longer works as non-root
Product: [Fedora] Fedora Reporter: Stef Walter <stefw>
Component: atomicAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: adimania, amurdaca, dperpeet, dustymabe, dwalsh, lsm5, mvollmer, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: atomic-1.16.4-1.fc26 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-01 17:11:06 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:

Description Stef Walter 2016-03-15 07:50:11 UTC
Previously non-root users could use the 'lastlog'. Now they get 'Permission denied'. This issue was caught by the Cockpit integration tests.

Version-Release number of selected component (if applicable):

* 2016-03-11 13:00:48     23.81     959ae205c4     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     

shadow-utils-4.2.1-3.fc23.x86_64

How reproducible:

Every time

Steps to Reproduce:
1. Boot Fedora Atomic 23.81
2. Log in as a non root user, such as 'fedora'
3. Run lastlog

Actual results:

$ lastlog
/var/log/lastlog: Permission denied
$ sudo ls -l /var/log/lastlog 
----------. 1 root root 292584 Mar 15 07:46 /var/log/lastlog

Expected results:

$ lastlog
Username         Port     From             Latest
root                                       **Never logged in**
...
$ sudo ls -l /var/log/lastlog 
-rw-r--r--. 1 root root 292584 Mar 15 03:49 /var/log/lastlog

Comment 1 Stef Walter 2016-03-15 09:10:12 UTC
RHEL Atomic Host has the same issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1317798

Comment 2 Daniel Walsh 2016-06-03 19:48:17 UTC
Colin this looks like an Atomic host bug that got lost in the noise,

Comment 3 Fedora Admin XMLRPC Client 2016-06-08 14:19:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Colin Walters 2016-06-08 15:10:13 UTC
I can't reproduce this with a recent-ish vagrant box at least: https://atlas.hashicorp.com/fedora/boxes/23-atomic-host

# atomic host status
  TIMESTAMP (UTC)         VERSION    ID             OSNAME            REFSPEC                                                
* 2016-04-19 19:04:34     23.106     05052ae3bb     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host

Comment 5 Stef Walter 2016-07-08 19:24:17 UTC
I can reproduce with:

  TIMESTAMP (UTC)         VERSION    ID             OSNAME            REFSPEC                                                
* 2016-06-07 01:00:21     23.131     aadcfe51ac     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host     

-bash-4.3# su fedora
[fedora@localhost roothome]$ lastlog
/var/log/lastlog: Permission denied

Comment 6 Stef Walter 2016-07-08 19:26:07 UTC
Same on RHEL Atomic:

-bash-4.2# atomic host status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME               REFSPEC                                                        
* 2016-05-06 05:57:30     7.2.4     b060975ce3     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
-bash-4.2# su cloud-user
[cloud-user@localhost roothome]$ lastlog
/var/log/lastlog: Permission denied

Comment 7 Stef Walter 2016-09-09 06:41:55 UTC
This is still the case on:

  fedora-atomic:fedora-atomic/f23/x86_64/docker-host
       Version: 23.174 (2016-09-01 18:44:32)

and

  rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
       Version: 7.2.6-1 (2016-08-18 16:01:03)

Comment 8 Fedora Update System 2017-03-09 20:58:00 UTC
atomic-1.16.3-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2ad6948192

Comment 9 Fedora Update System 2017-03-09 20:59:03 UTC
atomic-1.16.3-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cf5944a771

Comment 10 Fedora Update System 2017-03-11 00:21:15 UTC
atomic-1.16.3-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-cf5944a771

Comment 11 Fedora Update System 2017-03-11 14:25:46 UTC
atomic-1.16.3-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2ad6948192

Comment 12 Fedora Update System 2017-03-16 16:02:42 UTC
atomic-1.16.4-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e8cbc792c6

Comment 13 Fedora Update System 2017-03-17 02:20:14 UTC
atomic-1.16.4-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e8cbc792c6

Comment 14 Fedora Update System 2017-04-01 17:11:06 UTC
atomic-1.16.4-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.