[Sunhelp] Time based login restrictions
Robert.Cross at scottish-newcastle.co.uk
Robert.Cross at scottish-newcastle.co.uk
Tue Aug 29 06:14:29 CDT 2000
--Boundary_(ID_W74/CO1Q0sU8WFqPFv1+Ng)
Content-type: TEXT/PLAIN
Content-transfer-encoding: 7BIT
KALYANMI at mail.aramco.com.sa wrote:
>Hi i have 20 users log on to one solaris server. I want to resctrict 5
>user's from logging into server after 5.0 pm till 7 am.. How do i do this in
>solaris ?
I don't know whether there's an official way, but in the minute or two I've
been thinking
about this two possibilities occur to me:
1. A small (I hope) patch into /etc/profile.
The patch would first check to see if the user logging in was one of the five.
If so, it would then check the time. If the time was in the permitted range
then
do nothing. Otherwise issue a message to the screen, log the attempt and
then exit? Not sure how this would be handled in at'd jobs though.
2. Two small cron jobs, say stop-users and start-users.
Run stop-users at 5pm, and start-users at 7am. stop-users would use the
usermod(1m) command to change the shell of each of the five users to
a small executable script that was written. The new login shell script when run
would print some informative message and then exit. start-users when run would
again
use again use usermod to change the shell value of the five users, this time
back to the
previous usable shell setting. I prefer this version to #1
There's other ways, (like storing the users encrypted passwords, setting them to
something else, then resetting later), but this sounds like 'rocket science' to
me.
Someone else also mentioned that there was some freeware package on the web
to do this - try a web search in AskJeeves or something similar?
Bob Cross.
[apologies for the disclaimer]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This message is confidential. It may also be privileged or
protected by other legal rules. It does not constitute an
offer or acceptance of an offer, nor shall it form any part
of a legally binding contract. If you have received this
communication in error, please let us know by reply then
destroy it. You should not use, print, copy the message or
disclose its contents to anyone.
E-mail is subject to possible data corruption, is not
secure, and its content does not necessarily represent the
opinion of this Company. No representation or warranty is
made as to the accuracy or completeness of the information
and no liability can be accepted for any loss arising from
its use.
This e-mail and any attachments are not guaranteed to be
free from so-called computer viruses and it is recommended
that you check for such viruses before down-loading it to
your computer equipment. This Company has no control over
other websites to which there may be hypertext links and no
liability can be accepted in relation to those sites.
Scottish & Newcastle plc
Registered in Scotland, Registered Number 16288
Registered Office: 50 East Fettes Avenue, Edinburgh, EH4 1RR
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
--Boundary_(ID_W74/CO1Q0sU8WFqPFv1+Ng)--
More information about the SunHELP
mailing list