Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For a kind of Internet Café we want to do the following:

  • People buy access for their username for a specific time period. E.g. the coming hour.
  • The coming hour they can log in on an OpenSuse box
  • After the hour the system automatically logs out the user
  • The user can not log in anymore

How to set this up?

(Later we maybe want to add a warning 5 minutes before shutting of)

share|improve this question

migrated from superuser.com Oct 14 '09 at 18:31

This question came from our site for computer enthusiasts and power users.

1 Answer 1

up vote 1 down vote accepted

I would use LDAP instead of a database in combination with a logout script timed by at(d).

Some maybe usefull code snippets:

Timed logout:

at 13:37 -f logout.sh
at now + 1 hour -f logout.sh

Command to force logout:

kill -15 $(ps -U NameOfUserToLogout -o "pid=")
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.