Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

user access limit

Posted on 2003-12-06
5
Medium Priority
?
351 Views
Last Modified: 2013-12-15
I`m a new user of the linux SuSE prof 7.3 and the computer i use serves as an authentication server.I have added new users and the server can authenticate the users well.My problem is that i have to limit the users by the number of hours they are suppose to connect to my server to obtain services,but now when i use a command like chage,it gives me an opportunity to limit the user by the number of MONTHS and DAYS .Infact my interest is to limit the users by the number of HOURS ,so i dont know this is posible and how.
Does it means linux SuSE is not good at managing users?
Do i also need another server or operating system for controlling my users?
   I will be very grateful for your answers
0
Comment
Question by:chickcanete
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 180 total points
ID: 9888530
SuSE is not better or worse than other distributions in controlling users. It's all a matter of which packages you have installed. SuSE 7.3 is pretty old, and I don't remember what exactly it did provide. If you want to limit the times a user can log in (e.g. 10am to 2pm on weekdays, and 8am to 4pm on weekends), you can do this with PAM. See the configuration file /etc/security/time.conf for examples. If you don't have this file, you may need to install the PAM package.

If however you want to limit the user to just e.g. two hours a day in total, regardless of how often they log in, I doubt that this is possible with standard SuSE tools.  

You may be able to do this with a custom program that you use as the login shell for the users that have this restriction: It would first open the wtpm file and add all the login times for the current day and compare them with a set limit. If the limit is not yet exceeded, it would then spawn a shell and let the user in, if the time is already exceeded, it would not spawn the shell, and therefore log the user out again. The only problem is now to log the user out if the time limit is exceeded during the login session. To do that, I would write a data record to a file, which is then parsed at certain times to see if a user needs to be logged out. I did search the internet, but did not find any application that already does this.

BTW: You should consider to update to a more recent version of SuSE. They did just discontinue support for 7.3, which means that you will not get any more security updates for this release.
0
 

Assisted Solution

by:devilonnet
devilonnet earned 176 total points
ID: 10033132
try LDAP and IPTABLES...we r doing it that way...it works just fine...u can define it on days of week, and the hours the user can log in...
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10033391
You can also use the ideld daemon (http://www.darkwing.com/idled/) to force a logout after a certain login time. This is pretty old software (I think the last update happend in'99). You need to compile it yourself. Instructions about how to download and compile the software are here:

http://www.experts-exchange.com/Operating_Systems/Linux/Linux_Administration/Q_20837811.html

(The instructions are near the end of the thread).
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question