Bugtraq mailing list archives

Re: pam limits drops privileges


From: Tarhon-Onu Victor <mituc () iasi rdsnet ro>
Date: Thu, 6 Sep 2001 16:39:42 +0300 (EEST)

On Thu, 6 Sep 2001, Lukasz Trabinski wrote:

Password:
Too many logins for 'test'.

        First of all kill all the processes owned by test. Then let's make
it step by step:

# groupadd testgroup
# useradd -g testgroup testuser
# echo '@testgroup - maxlogins 3'>>/etc/security/limits.conf
# ssh pulea@localhost
pulea@localhost's password:
Last login: Thu Sep  6 16:30:16 2001 from localhost.localdomain
blackblue (pulea):~>telnet 0 -l testuser
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
Password:
Last login: Thu Sep  6 16:32:33 from localhost.localdomain
blackblue (pulea):~>id
uid=504(pulea) gid=100(users) groups=508(testgroup)
blackblue (pulea):~>id testuser
uid=508(testuser) gid=508(testgroup) groups=508(testgroup)

        Syslog messages:

Sep  6 16:33:30 blackblue pam_limits[19558]: checking if testuser is in
group testgroup
Sep  6 16:33:30 blackblue  -- testuser[19558]: LOGIN ON pts/1 BY pulea
FROM localhost.localdomain

        You will obtain same results (logging in as testuser you will get
pulea's shell) logging from console as testuser.

-- 
Tarhon-Onu Victor
Network and System Engineer
RDS Iasi - Network Operations Center
Phone: +40-32-218385



Current thread: