You are not logged in.

#1 2012-09-08 01:39:13

splats
Member
Registered: 2011-11-16
Posts: 12

last and who seem broken

Hello.

This is a little frustrating.  I and my wife belong to all the same groups, but "/usr/bin/last" never reports my wife (nor my kids (though they aren't in all of the same groups, so forget I even mentioned them, thanks so very much)).

Same for  "/usr/bin/who", it only reports root and myself.

Our /etc/passwd entries look sort of like so:

splats:x:1000:100::/home/splats/:/bin/bash
wife:x:1001:100::/home/wife/:/bin/bash

I've rtfm'd whatever I could think of, but can't figure this out.  I'd be gratefully for any help.

Thanks much
splats.

==  edit ==

Here's something else I've discovered  - If wife logs in by way of a tty, then wife is reported by 'who' and 'last'. 

== /edit ==

Last edited by splats (2012-09-08 02:46:11)


-- Splats.

Offline

#2 2012-09-08 02:17:16

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: last and who seem broken

What is your $PATH ?

Offline

#3 2012-09-08 02:24:20

splats
Member
Registered: 2011-11-16
Posts: 12

Re: last and who seem broken

HI,

for me, echo $PATH says:

/usr/local/qt-x11-free-3.3.3//bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/opt/qt/bin


For my wife, it says:

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/opt/qt/bin


Does that tell ye anything?

Thanks,
Splats.


-- Splats.

Offline

#4 2012-09-08 03:58:36

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: last and who seem broken

maybe your /var/log/wtmp got erased some way.

Offline

#5 2012-09-08 09:06:50

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

Re: last and who seem broken

How does your wife and kids log in? Do they use e.g. slim? Please post the relevant configs.

Offline

#6 2012-09-08 19:46:38

splats
Member
Registered: 2011-11-16
Posts: 12

Re: last and who seem broken

karol wrote:

How does your wife and kids log in? Do they use e.g. slim? Please post the relevant configs.

Hi Karol,

We all log in via xdm.  Also -   I apologize, but I don't know which configs are relevant - but maybe this:

splats@nomad:/home/splats$cat  /etc/X11/xdm/arch-xdm/xdm-config

DisplayManager.errorLogFile:	/var/log/xdm.log
DisplayManager.pidFile:		/var/run/xdm.pid
DisplayManager.keyFile:		/etc/X11/xdm/xdm-keys
DisplayManager.servers:		/etc/X11/xdm/Xservers
DisplayManager.accessFile:	/etc/X11/xdm/Xaccess
DisplayManager.willing:		su nobody -c /etc/X11/xdm/Xwilling

DisplayManager*authorize:	true

DisplayManager._0.setup:	/etc/X11/xdm/arch-xdm/Xsetup
DisplayManager._0.startup:	/etc/X11/xdm/arch-xdm/Xstartup
DisplayManager._0.reset:	/etc/X11/xdm/TakeConsole

DisplayManager*chooser:		/usr/lib/X11/xdm/chooser
DisplayManager*resources:	/etc/X11/xdm/arch-xdm/Xresources
DisplayManager*session:		/etc/X11/xdm/Xsession
DisplayManager*authComplain:	true

DisplayManager.requestPort:	0

Thanks much,
Splats.


-- Splats.

Offline

#7 2012-09-08 19:56:35

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: last and who seem broken

Are there sessreg-commands in /etc/X11/xdm/arch-xdm/Xstartup and /etc/X11/xdm/TakeConsole? See man sessreg for more details.
Alternatively, what is the content of etc/pam.d/xdm? There should be a reference to pam_lastlog in this or one of the included files.
If nothing works, maybe try to switch to lxdm.
More here: https://bbs.archlinux.org/viewtopic.php?id=131024

Last edited by progandy (2012-09-08 19:57:20)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#8 2012-09-08 20:17:15

splats
Member
Registered: 2011-11-16
Posts: 12

Re: last and who seem broken

progandy wrote:

Are there sessreg-commands in /etc/X11/xdm/arch-xdm/Xstartup and /etc/X11/xdm/TakeConsole? See man sessreg for more details.
Alternatively, what is the content of etc/pam.d/xdm? There should be a reference to pam_lastlog in this or one of the included files.

Hi, and thanks.

You mention 3 files - the first looks like this:

 cat /etc/X11/xdm/arch-xdm/Xstartup
#!/bin/sh

# Get rid of all clients started by Xsetup
xwininfo -root -children | grep '  0x' | cut -d' ' -f6 | xargs -n1 xkill -id

# From the default Xstartup file; 'GiveConsole'
chown $USER /dev/console

The second looks like:

 cat /etc/X11/xdm/TakeConsole
#!/bin/sh
# Reassign ownership of the console to root, this should disallow
# assignment of console output to any random users's xterm
#
chmod 622 /dev/console
chown root /dev/console

and the last:

cat /etc/pam.d/xdm 
#%PAM-1.0
auth		required	pam_unix.so
auth		required	pam_nologin.so
auth		required	pam_env.so
account		required	pam_unix.so
password	required	pam_unix.so
session		required	pam_unix.so
session		required	pam_limits.so
session		required	pam_loginuid.so
-session	optional	pam_systemd.so

You'll note on that last that there is no reference to pam_lastlog.  About switching to lxdm, I have no objections to switching, but I really hate display managers that require input from the mouse (personal gripe) - can you tell me if lxdm allows keyboard only logins? 

I'll take a look at sessreg and see if its over my head or not (my powers are weak), and I'll check out your link.

Thanks again,
Splats.


-- Splats.

Offline

#9 2012-09-08 20:39:09

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: last and who seem broken

It seems your xdm theme is missing the required calls to sessreg. You can find the right lines in /etc/X11/xdm/GiveConsole, /etc/X11/xdm/Xreset, /etc/X11/xdm/Xstartup. Or try another xdm theme. You won'T have to edit the pam file then.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#10 2012-09-09 15:28:23

splats
Member
Registered: 2011-11-16
Posts: 12

Re: last and who seem broken

Still goofy. 

I've switched to lxdm (which I like so far) and removed xorg-xdm, but last and w only show terminal logins (xfce-terminal, xterm, ttys, sshs) but nothing on DISPLAY:0.0.  That is to say, if someone starts an x-session then they are not reported as having logged in (via last, or w) unless they open a terminal window.

I'm not able too find any relevant errors in /var/log, nor in ~.

We use xfce, so I followed the wiki for lxdm except for the gnome-keyring parts -  and I'm wondering if I need it - it's not installed on my machine.

Thanks for the help so far - I do appreciate it.


-- Splats.

Offline

Board footer

Powered by FluxBB