You are not logged in.

#1 2012-07-06 17:22:48

Marcus27
Member
From: Hamburgo
Registered: 2012-07-05
Posts: 11

Last login on console

Hi.

I am very new to Arch so my question is maybe rubbish. But I googled a lot and could not find an answer...

When I log in I keep getting two lines giving information about the last login. The second giving the time of the current login...

nb login: root
Password:
Last login: Fri Jul  6 18:10:03 CEST 2012 on tty1
Last login: Fri Jul  6 19:10:50 on tty1

1. Having .hushlogin I still get the first one.
2. Using "# session optional pam_lastlog.so" in /etc/pam.d/login I get the one with the current time.
3. Just having 1. and 2. I get nothing.

Is that normal behaviour?

Offline

#2 2012-07-06 17:33:57

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

Re: Last login on console

Hi Marcus, can you please elaborate about your system?
How was the installation, what packages you installed, since when this is happening - this is happening from the very first moment you logged to your system after a fresh install or it start happening after you installed some package, made any tweaks, etc.?

Last edited by msx (2012-07-07 03:07:32)


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

#3 2012-07-06 17:48:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,096
Website

Re: Last login on console

We ship login(1) from util-linux now, which provides its own lastlog feature. The OP hasn't looked at  their /etc/pam.d/login.pacnew. Their current /etc/pam.d/login still contains a reference to PAM's lastlog module. Advisable to simply replace the login configured with the pacnew as it takes advantage of pambase.

Offline

#4 2012-07-06 18:16:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,431

Re: Last login on console

In short: always take care of the pacnew files.

Offline

#5 2012-07-07 18:11:56

Marcus27
Member
From: Hamburgo
Registered: 2012-07-05
Posts: 11

Re: Last login on console

falconindy wrote:

We ship login(1) from util-linux now, which provides its own lastlog feature. The OP hasn't looked at  their /etc/pam.d/login.pacnew. Their current /etc/pam.d/login still contains a reference to PAM's lastlog module.

Yes, you are right, there is login.pacnew. (I have not read a lot about pacman so far. So much new stuff for me...)

falconindy wrote:

Advisable to simply replace the login configured with the pacnew as it takes advantage of pambase

Just because I am a newbie and still don't have this now I really know what to do feeling.

I should copy all these lines from pam.d/login.pacnew to pam.d/login?

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login

And in pam.d/login I am supposed to delete which lines then?

Just

session        optional    pam_lastlog.so

Or do more need to be deleted? And is the order important?

Offline

#6 2012-07-07 18:17:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,178

Re: Last login on console

I would suggest, for this special case, merely:  mv /etc/pam.d/login.pacnew /etc/pam.d/login   (Performed as root)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#7 2012-07-08 15:54:38

Marcus27
Member
From: Hamburgo
Registered: 2012-07-05
Posts: 11

Re: Last login on console

ewaller wrote:

I would suggest, for this special case, merely:  mv /etc/pam.d/login.pacnew /etc/pam.d/login   (Performed as root)

It is working. Thanks a lot.

Offline

Board footer

Powered by FluxBB