can't get lastlogin info wen loging in trough ssh

-----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 lastlogi=
n
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=EDas.-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBNJqhRB0HKLRQp/gRAumNAKDEa7tGpE0YVq+pCYinXHwiy3pxtgCe PjDk
9BgFpyyMwz8tAe4gk8VJe9s=3D
=3DehDS
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mlopezb [ Di, 31 August 2004 17:34 ] [ ID #72730 ]

Re: can't get lastlogin info wen loging in trough ssh

Mat=EDas L=F3pez 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 lastlo=
gin
> 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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Laurent CARON [ Di, 31 August 2004 19:25 ] [ ID #72731 ]

Re: can't get lastlogin info wen loging in trough ssh

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

Laurent CARON wrote:
| Mat=EDas L=F3pez 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 lastl=
ogin
|> date doesn't appears. It does appears wen I login from the box itsel=
f,
|> 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=3Dsystem-aut=
h
auth required /lib/security/pam_nologin.so
account required /lib/security/pam_stack.so service=3Dsystem-aut=
h
password required /lib/security/pam_stack.so service=3Dsystem-aut=
h
session required /lib/security/pam_stack.so service=3Dsystem-aut=
h
session required /lib/security/pam_limits.so
session optional /lib/security/pam_console.so

Suggestions?

Best Regards,
Mat=EDas.

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

iD8DBQFBNNiMRB0HKLRQp/gRAuBeAKCm9ErBPNGpg/kkIp6G9mKGEQJJQACg x23K
VjWabl3yPWFINU/th1xO0/k=3D
=3Dm+YN
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mlopezb [ Di, 31 August 2004 21:59 ] [ ID #72732 ]

Re: can't get lastlogin info wen loging in trough ssh

Mat=EDas L=F3pez 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 displa=
ys
> 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=3Dsystem-a=
uth
> auth required /lib/security/pam_nologin.so
> account required /lib/security/pam_stack.so service=3Dsystem-a=
uth
> password required /lib/security/pam_stack.so service=3Dsystem-a=
uth
> session required /lib/security/pam_stack.so service=3Dsystem-a=
uth
> 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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Laurent CARON [ Di, 31 August 2004 22:14 ] [ ID #72733 ]

Re: can't get lastlogin info wen loging in trough ssh

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

Laurent CARON wrote:
| Mat=EDas L=F3pez 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 displ=
ays
|> 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=3Dsystem-=
auth
|> auth required /lib/security/pam_nologin.so
|> account required /lib/security/pam_stack.so service=3Dsystem-=
auth
|> password required /lib/security/pam_stack.so service=3Dsystem-=
auth
|> session required /lib/security/pam_stack.so service=3Dsystem-=
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 an=
d
no lastlog info is displayed.

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

iD8DBQFBNfg1RB0HKLRQp/gRAkdMAKCNVg6v6/D7NeS6FoCAbA8LDVZWFQCf UWZM
lSgUdawjtzPasZjzw/o2I8U=3D
=3DCIVo
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mlopezb [ Mi, 01 September 2004 18:26 ] [ ID #72735 ]

Re: can't get lastlogin info wen loging in trough ssh

-----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=EDas.




Laurent CARON wrote:
| Mat=EDas L=F3pez 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 lastl=
ogin
|> date doesn't appears. It does appears wen I login from the box itsel=
f,
|> 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 [at] 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/gRAhNdAKCAxJ1ygJE8tDa7jPndes8Iwl4wRgCg lrfG
iAz/KGSIeKhZ2b/Vx3WGSiY=3D
=3D1R3S
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mlopezb [ Do, 28 Oktober 2004 22:55 ] [ ID #454506 ]

Re: can't get lastlogin info wen loging in trough ssh

See /etc//login.defs

LASTLOG_ENAB yes

--Adrian.


On Thu, 28 Oct 2004 17:55:10 -0300, Mat=EDas L=F3pez Bergero
<mlopezb [at] 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 m=
y
> 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 s=
sh,
> 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=EDas.
>
> Laurent CARON wrote:
>
>
> | Mat=EDas L=F3pez 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 las=
tlogin
> |> date doesn't appears. It does appears wen I login from the box its=
elf,
> |> 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-adm=
in" in
> | the body of a message to majordomo [at] 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/gRAhNdAKCAxJ1ygJE8tDa7jPndes8Iwl4wRgCg lrfG
> iAz/KGSIeKhZ2b/Vx3WGSiY=3D
> =3D1R3S
> -----END PGP SIGNATURE-----
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin=
" in
> the body of a message to majordomo [at] 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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
drupix [ Do, 28 Oktober 2004 23:02 ] [ ID #454508 ]

Re: can't get lastlogin info wen loging in trough ssh

-----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=EDas.

|
| On Thu, 28 Oct 2004 17:55:10 -0300, Mat=EDas L=F3pez Bergero
| <mlopezb [at] udesa.edu.ar> wrote:
|
| I'm not able to display the lastlog msg wen I log in thought ssh on m=
y
| 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/gRArpUAKCQgW7mrtt8OBewfI2CXWS2dvjXHACg w/yf
9coias4UU1c6Yyi/NVNwbSs=3D
=3DNA2C
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mlopezb [ Fr, 29 Oktober 2004 16:05 ] [ ID #455875 ]

Re: can't get lastlogin info wen loging in trough ssh

Mat=EDas L=F3pez 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 [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Laurent CARON [ Fr, 29 Oktober 2004 16:10 ] [ ID #455876 ]

Re: can't get lastlogin info wen loging in trough ssh

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


Hello,
=46inally I solved the problem.

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

#%PAM-1.0
auth required pam_stack.so service=3Dsystem-auth
auth required pam_nologin.so
account required pam_stack.so service=3Dsystem-auth
password required pam_stack.so service=3Dsystem-auth
session required pam_stack.so service=3Dsystem-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 debu=
g
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/authlo=
g

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=EDas


Laurent CARON wrote:
| Mat=EDas L=F3pez 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/gRAsTRAKC7jzOXkT9xhYQcirC1aJavFWZGrACf XZfL
dT/05ljBoy7TpO9dNLHjUEU=3D
=3Dh/8P
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
mlopezb [ Fr, 29 Oktober 2004 20:47 ] [ ID #456465 ]
Linux » gmane.linux.admin » can't get lastlogin info wen loging in trough ssh

Vorheriges Thema: IDE disk drive controllers and disk drive sizes supported by RedHat 9
Nächstes Thema: FreeSWAN VPN gateway+firewall combo..