with encrypted home, /etc/legal is printed twice on every login

Bug #1473225 reported by Роман Донченко
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
shadow (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I have an encrypted home directory, and whenever I log in at the console, the contents of /etc/legal are printed twice (after the system load stats).

This happens because:

1) pam_motd.so uses ~/.cache/motd.legal-displayed to record the fact that /etc/legal has already been displayed;

2) the home directory is read-only until ecryptfs is mounted;

3) the MOTD is printed before ecryptfs is mounted, because in /etc/pam.d/login the pam_motd.so rules come before "@include common-session" (which includes the pam_ecryptfs.so rule).

The fix should be simple - just change the order so that the pam_motd.so rules come after "@include common-session". (The Apport report says my /etc/pam.d/login is modified, because I did just that.)

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: login 1:4.1.5.1-1.1ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
Date: Fri Jul 10 00:24:19 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-06-22 (1112 days ago)
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release amd64 (20120424.1)
ProcEnviron:
 TERM=linux
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=ru_RU.UTF-8
 XDG_RUNTIME_DIR=<set>
SourcePackage: shadow
UpgradeStatus: Upgraded to vivid on 2015-06-27 (12 days ago)
modified.conffile..etc.pam.d.login: [modified]
mtime.conffile..etc.pam.d.login: 2015-07-10T00:04:57.396555

Revision history for this message
Роман Донченко (dpb-r) wrote :
Tyler Hicks (tyhicks)
affects: shadow (Ubuntu) → pam (Ubuntu)
Revision history for this message
Tyler Hicks (tyhicks) wrote :

I shouldn't have reassigned this bug to pam. Sorry!

affects: pam (Ubuntu) → shadow (Ubuntu)
Mathew Hodson (mhodson)
Changed in shadow (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in shadow (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.