LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-18-2004, 05:56 AM   #1
coolend
LQ Newbie
 
Registered: May 2004
Posts: 1

Rep: Reputation: 0
Two problem about "using pam to limit user login"


OS£½RHEL 3 AS

Problem 1: use pam.wheel to limit users who can su to root

”°/etc/pam.d/su”± file content as follows:

auth sufficient /lib/security/pam_rootok.so
auth required /lib/security/pam_wheel.so use_uid group=admin
# only allow the members of ”°admin”± group to su to root

auth required /lib/security/pam_stack.so service=system-auth
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 optional /lib/security/pam_xauth.so

now we suppose there are 3 users , they are: alice , bob and courer

# usermod -G admin alice
after the above setting, only alice can su to root, but bob cannot.
the question is : bob unexpectedly cannot su to a common user such as courer too.

Some information in /var/log/message:

PAM-Wheel[3873]: Access denied for 'bob' to 'courer'

2. use pam.limits to limit the system resource

"/etc/pam.d/login" file content as follows:

auth required pam_securetty.so
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 optional pam_console.so
session required pam_limits.so

"/etc/security/limits.conf" file content as follows:

alice - maxlogins 1
bob - maxlogins 2
courer - maxlogins 0

then, 2 alice can login at the same time, 3 bob can login the same time, courer cannot login

why I cannot only allow one person login at the same time ?
N=n+1 (n>0) ?
 
Old 06-03-2004, 10:24 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
woops

I misread the question. I have no answer for this problem

Last edited by DavidPhillips; 06-03-2004 at 10:26 PM.
 
Old 06-04-2004, 03:00 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

Is it me, or does this look like a homework question? Alice and Bob indeed.
 
Old 06-04-2004, 01:11 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I don't know but it would seem your asking for trouble doing this. I have seen that normally a user is showing as logged in more than once from normal use. Your going to end up getting into a lockout situation.

david@firedragon:~> users
david david


If it's remote shell access only you may be ok. If they are using X they will have trouble to open an xterm.

Last edited by DavidPhillips; 06-04-2004 at 01:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No UTMPX entry, You must EXEC "login" for the lowest "shell" ooihc Solaris / OpenSolaris 7 03-12-2007 02:09 PM
User Login Problem: "command not found" unless root! DreameR-X Linux - General 15 12-21-2004 11:27 AM
Howto disable "Graphical Login" or "Standard Login?" the_gripmaster Red Hat 1 07-08-2004 02:55 PM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM
Shorten a Qmail user name to "user" instead of "user@domain.com" anorman Linux - Software 0 12-12-2003 08:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration