My OS is Solaris 10, I would like to know if there is any way to restrict user login to the system (either remote or console login) after certain time, say 20:00 on Mon to Fri and whole day on SAT and SUN???
How about playing around /etc/passwd file for example say 20:00 on Mon to Fri and whole day on SAT and SUN you can replace or comment the line in /etc/passwd. Schedule a script which can perform the task and once through every morning removed the replace the file with actual one or remove the cooment line from /etc/passwd!!!!!
If you want to block everyone from accessing a system after a specified time, you need to create a /etc/nologin file at that exact time. The file has to be removed at the time you want to allow access to the system. This can be achieved through a crontabs
Type crontab -e while logged in as root and add these lines on the files...
# Block access at 8:00PM from Mon-Fri
00 20 * * 1,2,3,4,5 touch /etc/nologin
# Open access at 8:00 AM from Mon-Fri
00 08 * * 1,2,3,4,5 rm -rf /etc/nologin