linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can't get lastlogin info wen loging in trough ssh
@ 2004-08-31 15:34 Matías López Bergero
  2004-08-31 17:25 ` Laurent CARON
  0 siblings, 1 reply; 10+ messages in thread
From: Matías López Bergero @ 2004-08-31 15:34 UTC (permalink / raw)
  To: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I can't get lastlogin info wen login in trough ssh no mater where I
login from.
I have enabled the PrintLastLog option in sshd_config, but the lastlogin
date doesn't appears. It does appears wen I login from the box itself,
but not via ssh.

Any ideas on how can I get this to work?
I have a RedHat 8, Linux 2.4.27, OpenSSH_3.4p1.

TIA,
Best Regards,
Matías.-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBNJqhRB0HKLRQp/gRAumNAKDEa7tGpE0YVq+pCYinXHwiy3pxtgCePjDk
9BgFpyyMwz8tAe4gk8VJe9s=
=ehDS
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-08-31 15:34 can't get lastlogin info wen loging in trough ssh Matías López Bergero
@ 2004-08-31 17:25 ` Laurent CARON
  2004-08-31 19:59   ` Matías López Bergero
  2004-10-28 20:55   ` Matías López Bergero
  0 siblings, 2 replies; 10+ messages in thread
From: Laurent CARON @ 2004-08-31 17:25 UTC (permalink / raw)
  To: Matías López Bergero; +Cc: linux-admin

Matías López Bergero wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> I can't get lastlogin info wen login in trough ssh no mater where I
> login from.
> I have enabled the PrintLastLog option in sshd_config, but the lastlogin
> date doesn't appears. It does appears wen I login from the box itself,
> but not via ssh.
>
> Any ideas on how can I get this to work?
> I have a RedHat 8, Linux 2.4.27, OpenSSH_3.4p1.
>
Hello,

have a look in /etc/pam.d/ssh

Laurent
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-08-31 17:25 ` Laurent CARON
@ 2004-08-31 19:59   ` Matías López Bergero
  2004-08-31 20:14     ` Laurent CARON
  2004-10-28 20:55   ` Matías López Bergero
  1 sibling, 1 reply; 10+ messages in thread
From: Matías López Bergero @ 2004-08-31 19:59 UTC (permalink / raw)
  To: Laurent CARON; +Cc: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Laurent CARON wrote:
| Matías López Bergero wrote:
|
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Hi,
|> I can't get lastlogin info wen login in trough ssh no mater where I
|> login from.
|> I have enabled the PrintLastLog option in sshd_config, but the lastlogin
|> date doesn't appears. It does appears wen I login from the box itself,
|> but not via ssh.
|>
|> Any ideas on how can I get this to work?
|> I have a RedHat 8, Linux 2.4.27, OpenSSH_3.4p1.
|>
| Hello,
|
| have a look in /etc/pam.d/ssh
|
| Laurent
|

Hello,
Thanks for the answer Laurent,

I am not very sure of what to look for.. or add.
Everything looks ok there. I compare it to another system that displays
the lastlogin date on the ssh login process.

This is how the sshd file in pam.d look like:

#%PAM-1.0
auth       required     /lib/security/pam_stack.so service=system-auth
auth       required     /lib/security/pam_nologin.so
account    required     /lib/security/pam_stack.so service=system-auth
password   required     /lib/security/pam_stack.so service=system-auth
session    required     /lib/security/pam_stack.so service=system-auth
session    required     /lib/security/pam_limits.so
session    optional     /lib/security/pam_console.so

Suggestions?

Best Regards,
Matías.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBNNiMRB0HKLRQp/gRAuBeAKCm9ErBPNGpg/kkIp6G9mKGEQJJQACgx23K
VjWabl3yPWFINU/th1xO0/k=
=m+YN
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-08-31 19:59   ` Matías López Bergero
@ 2004-08-31 20:14     ` Laurent CARON
  2004-09-01 16:26       ` Matías López Bergero
  0 siblings, 1 reply; 10+ messages in thread
From: Laurent CARON @ 2004-08-31 20:14 UTC (permalink / raw)
  To: Matías López Bergero; +Cc: linux-admin

Matías López Bergero wrote:

>
>
> Hello,
> Thanks for the answer Laurent,
>
> I am not very sure of what to look for.. or add.
> Everything looks ok there. I compare it to another system that displays
> the lastlogin date on the ssh login process.
>
> This is how the sshd file in pam.d look like:
>
> #%PAM-1.0
> auth       required     /lib/security/pam_stack.so service=system-auth
> auth       required     /lib/security/pam_nologin.so
> account    required     /lib/security/pam_stack.so service=system-auth
> password   required     /lib/security/pam_stack.so service=system-auth
> session    required     /lib/security/pam_stack.so service=system-auth
> session    required     /lib/security/pam_limits.so
> session    optional     /lib/security/pam_console.so
>
> Suggestions?
>
Try adding
session    optional   /lib/security/pam_lastlog.so

Laurent


-- 
Q:	What do Winnie the Pooh and John the Baptist have in common?
A:	The same middle name.

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-08-31 20:14     ` Laurent CARON
@ 2004-09-01 16:26       ` Matías López Bergero
  0 siblings, 0 replies; 10+ messages in thread
From: Matías López Bergero @ 2004-09-01 16:26 UTC (permalink / raw)
  To: Laurent CARON; +Cc: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Laurent CARON wrote:
| Matías López Bergero wrote:
|
|>
|>
|> Hello,
|> Thanks for the answer Laurent,
|>
|> I am not very sure of what to look for.. or add.
|> Everything looks ok there. I compare it to another system that displays
|> the lastlogin date on the ssh login process.
|>
|> This is how the sshd file in pam.d look like:
|>
|> #%PAM-1.0
|> auth       required     /lib/security/pam_stack.so service=system-auth
|> auth       required     /lib/security/pam_nologin.so
|> account    required     /lib/security/pam_stack.so service=system-auth
|> password   required     /lib/security/pam_stack.so service=system-auth
|> session    required     /lib/security/pam_stack.so service=system-auth
|> session    required     /lib/security/pam_limits.so
|> session    optional     /lib/security/pam_console.so
|>
|> Suggestions?
|>
| Try adding
| session    optional   /lib/security/pam_lastlog.so
|
| Laurent
|
|

Hi,
That didn't solve my problem :(
I add the line at the end of the file and still can login trough ssh and
no lastlog info is displayed.

Thank your very much for your help Laurent,
Best Regards,
Matías.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBNfg1RB0HKLRQp/gRAkdMAKCNVg6v6/D7NeS6FoCAbA8LDVZWFQCfUWZM
lSgUdawjtzPasZjzw/o2I8U=
=CIVo
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-08-31 17:25 ` Laurent CARON
  2004-08-31 19:59   ` Matías López Bergero
@ 2004-10-28 20:55   ` Matías López Bergero
  2004-10-28 21:02     ` Adrian C.
  1 sibling, 1 reply; 10+ messages in thread
From: Matías López Bergero @ 2004-10-28 20:55 UTC (permalink / raw)
  To: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
Again with this,

I'm not able to display the lastlog msg wen I log in thought ssh on my
Linux box.
I'm using OpenSSH_3.6.1p2

I have found this on the sshd man page:

LOGIN PROCESS
~     When a user successfully logs in, sshd does the following:

1.   If the login is on a tty, and no command has been specified,
prints last login time and /etc/motd (unless prevented in the
configuration file or by $HOME/.hushlogin; see the FILES sec-tion).


As far as I know, the ttys are the consoles connected to the st
input(keyboard), so, what is the sense of this??? Wen I login using ssh,
I'm doing it thought a tty?

I couldn't find anything about the process performed by ssh wen the
login is from a remote host.

Any help will be most welcome.

BR,
Matías.




Laurent CARON wrote:
| Matías López Bergero wrote:
|
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Hi,
|> I can't get lastlogin info wen login in trough ssh no mater where I
|> login from.
|> I have enabled the PrintLastLog option in sshd_config, but the lastlogin
|> date doesn't appears. It does appears wen I login from the box itself,
|> but not via ssh.
|>
|> Any ideas on how can I get this to work?
|> I have a RedHat 8, Linux 2.4.27, OpenSSH_3.4p1.
|>
| Hello,
|
| have a look in /etc/pam.d/ssh
|
| Laurent
| -
| To unsubscribe from this list: send the line "unsubscribe linux-admin" in
| the body of a message to majordomo@vger.kernel.org
| More majordomo info at  http://vger.kernel.org/majordomo-info.html
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBgVyuRB0HKLRQp/gRAhNdAKCAxJ1ygJE8tDa7jPndes8Iwl4wRgCglrfG
iAz/KGSIeKhZ2b/Vx3WGSiY=
=1R3S
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-10-28 20:55   ` Matías López Bergero
@ 2004-10-28 21:02     ` Adrian C.
  2004-10-29 14:05       ` Matías López Bergero
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian C. @ 2004-10-28 21:02 UTC (permalink / raw)
  To: Matías López Bergero; +Cc: linux-admin

See /etc//login.defs

LASTLOG_ENAB      yes

--Adrian.


On Thu, 28 Oct 2004 17:55:10 -0300, Matías López Bergero
<mlopezb@udesa.edu.ar> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> Again with this,
> 
> I'm not able to display the lastlog msg wen I log in thought ssh on my
> Linux box.
> I'm using OpenSSH_3.6.1p2
> 
> I have found this on the sshd man page:
> 
> LOGIN PROCESS
> ~     When a user successfully logs in, sshd does the following:
> 
> 1.   If the login is on a tty, and no command has been specified,
> prints last login time and /etc/motd (unless prevented in the
> configuration file or by $HOME/.hushlogin; see the FILES sec-tion).
> 
> As far as I know, the ttys are the consoles connected to the st
> input(keyboard), so, what is the sense of this??? Wen I login using ssh,
> I'm doing it thought a tty?
> 
> I couldn't find anything about the process performed by ssh wen the
> login is from a remote host.
> 
> Any help will be most welcome.
> 
> BR,
> Matías.
> 
> Laurent CARON wrote:
> 
> 
> | Matías López Bergero wrote:
> |
> |> -----BEGIN PGP SIGNED MESSAGE-----
> |> Hash: SHA1
> |>
> |> Hi,
> |> I can't get lastlogin info wen login in trough ssh no mater where I
> |> login from.
> |> I have enabled the PrintLastLog option in sshd_config, but the lastlogin
> |> date doesn't appears. It does appears wen I login from the box itself,
> |> but not via ssh.
> |>
> |> Any ideas on how can I get this to work?
> |> I have a RedHat 8, Linux 2.4.27, OpenSSH_3.4p1.
> |>
> | Hello,
> |
> | have a look in /etc/pam.d/ssh
> |
> | Laurent
> | -
> | To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> | the body of a message to majordomo@vger.kernel.org
> | More majordomo info at  http://vger.kernel.org/majordomo-info.html
> |
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFBgVyuRB0HKLRQp/gRAhNdAKCAxJ1ygJE8tDa7jPndes8Iwl4wRgCglrfG
> iAz/KGSIeKhZ2b/Vx3WGSiY=
> =1R3S
> -----END PGP SIGNATURE-----
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-10-28 21:02     ` Adrian C.
@ 2004-10-29 14:05       ` Matías López Bergero
  2004-10-29 14:10         ` Laurent CARON
  0 siblings, 1 reply; 10+ messages in thread
From: Matías López Bergero @ 2004-10-29 14:05 UTC (permalink / raw)
  To: Adrian C.; +Cc: linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian C. wrote:
| See /etc//login.defs
|
| LASTLOG_ENAB      yes

Thanks Adrian, but still not working...
Any other ideas??

Thanks again,
BR,
Matías.

|
| On Thu, 28 Oct 2004 17:55:10 -0300, Matías López Bergero
| <mlopezb@udesa.edu.ar> wrote:
|
| I'm not able to display the lastlog msg wen I log in thought ssh on my
| Linux box.
| I'm using OpenSSH_3.6.1p2

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBgk4NRB0HKLRQp/gRArpUAKCQgW7mrtt8OBewfI2CXWS2dvjXHACgw/yf
9coias4UU1c6Yyi/NVNwbSs=
=NA2C
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-10-29 14:05       ` Matías López Bergero
@ 2004-10-29 14:10         ` Laurent CARON
  2004-10-29 18:47           ` Matías López Bergero
  0 siblings, 1 reply; 10+ messages in thread
From: Laurent CARON @ 2004-10-29 14:10 UTC (permalink / raw)
  To: Matías López Bergero; +Cc: Adrian C., linux-admin

Matías López Bergero wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Adrian C. wrote:
> | See /etc//login.defs
> |
> | LASTLOG_ENAB      yes

/etc/pam.d/ssh

#%PAM-1.0
auth       required     pam_nologin.so
auth       required     pam_unix.so
auth       required     pam_env.so # [1]

account    required     pam_unix.so

session    required     pam_unix.so
session    optional     pam_lastlog.so # [1]
session    optional     pam_motd.so # [1]
session    optional     pam_mail.so standard noenv # [1]
session    required     pam_limits.so

password   required     pam_unix.so

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: can't get lastlogin info wen loging in trough ssh
  2004-10-29 14:10         ` Laurent CARON
@ 2004-10-29 18:47           ` Matías López Bergero
  0 siblings, 0 replies; 10+ messages in thread
From: Matías López Bergero @ 2004-10-29 18:47 UTC (permalink / raw)
  To: Laurent CARON; +Cc: Adrian C., linux-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello,
Finally I solved the problem.

This is my /etc/pam.d/sshd file:

#%PAM-1.0
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
session    required     pam_limits.so
session    optional     pam_console.so
session    optional     /lib/security/pam_lastlog.so


I was reading a little bit about pam, and find out that there is a debug
flag to set on a pam module.

So, i set the module pam_lastlog to debug like this:
session    optional     /lib/security/pam_lastlog.so debug

I add the following line to my syslog.conf to capture all the
authentication procedures:
auth.*                                                  /var/log/authlog

And guess what find the the /var/log/atuhlog file???
PAM-lastlog[5890]: unable to open /var/log/lastlog file

Damn...
Problem solved. I chmod to 644 that file.

The option LASTLOG_ENAB in /etc/login.def it's not required to display
the lastlog message.

Many thanks to all for the help!
BR,
Matías


Laurent CARON wrote:
| Matías López Bergero wrote:
|
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Adrian C. wrote:
|> | See /etc//login.defs
|> |
|> | LASTLOG_ENAB      yes
|
|
| /etc/pam.d/ssh
|
| #%PAM-1.0
| auth       required     pam_nologin.so
| auth       required     pam_unix.so
| auth       required     pam_env.so # [1]
|
| account    required     pam_unix.so
|
| session    required     pam_unix.so
| session    optional     pam_lastlog.so # [1]
| session    optional     pam_motd.so # [1]
| session    optional     pam_mail.so standard noenv # [1]
| session    required     pam_limits.so
|
| password   required     pam_unix.so
|

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBgpBcRB0HKLRQp/gRAsTRAKC7jzOXkT9xhYQcirC1aJavFWZGrACfXZfL
dT/05ljBoy7TpO9dNLHjUEU=
=h/8P
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-29 18:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-31 15:34 can't get lastlogin info wen loging in trough ssh Matías López Bergero
2004-08-31 17:25 ` Laurent CARON
2004-08-31 19:59   ` Matías López Bergero
2004-08-31 20:14     ` Laurent CARON
2004-09-01 16:26       ` Matías López Bergero
2004-10-28 20:55   ` Matías López Bergero
2004-10-28 21:02     ` Adrian C.
2004-10-29 14:05       ` Matías López Bergero
2004-10-29 14:10         ` Laurent CARON
2004-10-29 18:47           ` Matías López Bergero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).