Link to home
Start Free TrialLog in
Avatar of KestasS
KestasS

asked on

Time limits to access Linux SMB share

Hello,

How could I implement time limits to access Linux resources ? I use Linux SuSE 7.2 with SAMBA 2.2

Thanks,

Kestutis
Avatar of Gns
Gns

What kind of timelimits are you aiming at? Fixed hours? All use? In that case, simply add a cron-job to stop/start samba. My SuSE install (7.1 on sparc) is dead ATM, so I can't check the specifics, but isn't there a rc.smb (or similar) that you could use?
Simply do (as root)
crontab -e

and add two lines something like the following:
0 6 * * 1-5 <substitute with command to START samba>
0 18 * * 1-5 <substitute with command to STOP samba>

which would keep samba active between 06.00 and 18.00 on weekdays.

If that wasn't "it", please be a bit more verbose about what you are looking for.

-- Glenn
Avatar of KestasS

ASKER

Thank you, Glenn, for your comment.

I would like to give acces for some users groups to SAMBA shared directories only during working hours.  However I could not stop SAMBA server as others users will not be able to work with their resources.  Also I would like to force logout users from SAMBA if their work during not work hours.

It is like in Novell Netware server or Micorosft NT Server.

Sorry if I am not clear :)

Kestutis
Hm, I thought that might be it. I've never seen any setting that would let youdo that, but... it shouldn't be too hard to dream up a shellscript that would "emulate" the functionality.

Whilst I read docs, and "dream on":-), you might find something usefull at http://www.samba.org

-- Glenn
ASKER CERTIFIED SOLUTION
Avatar of Gns
Gns

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KestasS

ASKER

I think also that is is a right direction. But I have already finished with developing the server at that direction. Let  younger colleagues develop that :)

Thank you for your attention !
Kestas