Bug 713384 - /bin/grep: /etc/pam.d/system-auth-ac: No such file or directory
Summary: /bin/grep: /etc/pam.d/system-auth-ac: No such file or directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 15
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 743845 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-15 09:02 UTC by Jan Stodola
Modified: 2011-10-06 10:40 UTC (History)
11 users (show)

Fixed In Version: systemd-36-3.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-30 18:53:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Stodola 2011-06-15 09:02:19 UTC
Description of problem:
Following message is written in /root/install.log after installation of F15:

...
Installing kbd-1.15.2-2.fc15.x86_64
Installing systemd-26-1.fc15.x86_64
/bin/grep: /etc/pam.d/system-auth-ac: No such file or directory
Installing linux-firmware-20110304-1.fc15.noarch
...

[root@gilliam ~]# rpm -q --scripts systemd
postinstall scriptlet (using /bin/sh):
/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
/bin/systemctl daemon-reexec > /dev/null 2>&1 || :

# Make sure pam_systemd is enabled
if ! /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
        /usr/sbin/authconfig --update >/dev/null 2>&1 || :

        # Try harder
        /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac || /usr/sbin/authconfig --updateall >/dev/null 2>&1 || :
fi


There should be some check whether the file exists before running 'grep' on it.


Version-Release number of selected component (if applicable):
systemd-26-1.fc15.x86_64

How reproducible:
always

Steps to Reproduce:
1. install F15 with default package set
2. check /root/install.log for errors

  
Actual results:
Error message during installation:
/bin/grep: /etc/pam.d/system-auth-ac: No such file or directory


Expected results:
no error messages

Comment 1 Michal Schmidt 2011-06-15 10:24:48 UTC
Is the file /etc/pam.d/system-auth-ac present after the installation?
Does it contain this line?:
  -session     optional      pam_systemd.so

If yes, then everything is alright and we just should shut up the message.
It does not really matter whether we do that by checking for the existence first or by redirecting stderr to /dev/null.

Comment 2 Jan Stodola 2011-06-15 10:51:24 UTC
Yes, the file is present:

[root@gilliam ~]# grep pam_systemd.so /etc/pam.d/system-auth-ac
-session     optional      pam_systemd.so
[root@gilliam ~]#

Comment 3 Göran Uddeborg 2011-07-05 21:32:38 UTC
I got the same message when I made a "yum --installroot ... groupinstall Base" to create a diskless client.

The file system-auth-ac belongs to the authconfig package, but only as %ghost:s.  And there isn't any scripts in the authconfig package that would create them.

Throwing away the message would silence RPM, but maybe a cleaner solution would be to explicitly test for the file's existence?

if ! test -f /etc/pam.d/system-auth-ac || ! /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac ; then

Comment 4 Mads Kiilerich 2011-08-05 13:25:44 UTC
Reproduced in f16 with systemd-33-1.fc16.x86_64

Comment 5 Fedora Update System 2011-09-01 00:34:28 UTC
systemd-35-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/systemd-35-1.fc16

Comment 6 Fedora Update System 2011-09-01 19:02:31 UTC
Package systemd-35-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-35-1.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/systemd-35-1.fc16
then log in and leave karma (feedback).

Comment 7 Mads Kiilerich 2011-09-02 15:19:52 UTC
_not_ fixed by systemd-35-1.

It runs
  /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac
but that will scream and fail too.

Comment 8 Matthias Runge 2011-09-07 07:30:54 UTC
is this a bug in authconfig (file is not there, but should be) or a bug in systemd's post-install?

[mrunge@herodot pam.d]$ /bin/grep -q pam_systemd /etc/pam.d/system-auth-ac 
[mrunge@herodot pam.d]$ 

No output, no screaming. Does it mean, it's fixed?

Comment 9 Mads Kiilerich 2011-09-07 09:10:03 UTC
/etc/pam.d/system-auth-ac is a %ghost file owned by authconfig. It do not exist when systems are installed in chroots, but it will probably be created by anaconda/firstboot and will thus always exist on running systems and on updates.

So there is a "contract inconsistency" between systemd and authconfig, and the most obvious place to fix it would be systemd.

Comment 10 Fedora Update System 2011-09-09 17:06:52 UTC
systemd-35-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Mads Kiilerich 2011-09-09 17:15:58 UTC
(In reply to comment #7)
> _not_ fixed by systemd-35-1.

Reopening

Comment 12 Fedora Update System 2011-09-23 17:06:30 UTC
systemd-36-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/systemd-36-2.fc16

Comment 13 Fedora Update System 2011-09-24 20:49:10 UTC
Package systemd-36-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-36-2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/systemd-36-2.fc16
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2011-09-30 18:52:47 UTC
systemd-36-3.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Michal Schmidt 2011-10-06 10:40:07 UTC
*** Bug 743845 has been marked as a duplicate of this bug. ***


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