richbrowncardiff Posted October 9, 2017 Posted October 9, 2017 Hi All, I'm looking to see if anyone knows of a way to give timed access to a shared folder ? thanks in advance !
MatZeRO Posted October 9, 2017 Posted October 9, 2017 Hi All, I'm looking to see if anyone knows of a way to give timed access to a shared folder ? thanks in advance ! Power shell script to change perms on a scheduled task? Or if they don’t need to access their account you could setup permitted logon times for the user (assuming you use AD)
richbrowncardiff Posted October 9, 2017 Author Posted October 9, 2017 Thanks I did think of this but its going to get messy as the amount of data grows. agree about AD login hours but it means I would need to create 5k accounts. This is all to do with Controlled assessments. I will go back to the drawing board I think.
jthompson Posted October 10, 2017 Posted October 10, 2017 (edited) Could a PowerShell script be scheduled that altered the permissions of the share instead, rather than the file permissions? PS: I don't know how to do this in PowerShell, but altering the share permissions is probably a quicker and easier way to shut people out. Edited October 10, 2017 by jthompson
Steve21 Posted October 10, 2017 Posted October 10, 2017 How many are going to access this at once? When you say 5k I'm assuming you don't want all 5k to have access at a single time? If you're talking like 500 one time, and 4500 blocked at that time you're going to have to have some kind of groups setup for them. Or will it be everyone at once, then no-one? There's few ways to do it but just depends which route you're going really. Steve
Norphy Posted October 10, 2017 Posted October 10, 2017 Could a PowerShell script be scheduled that altered the permissions of the share instead, rather than the file permissions? PS: I don't know how to do this in PowerShell, but altering the share permissions is probably a quicker and easier way to shut people out. I'm not sure which version of PowerShell they come with, possible 4+, but there are various cmdlets that let you set share permissions: Get-SmbShareAccess Block-SmbShareAccess Remove-SmbShareAccess Unblock-SmbShareAccess Grant-SmbShareAccess Get-SmbShare New-SmbShare Set-SmbShare Remove-SmbShare They'd do the trick I think
lcrowther Posted October 13, 2017 Posted October 13, 2017 How about setting the ACL so there is a group with deny read permissions, then use a scheduled powershell script to put them in and out of that group. Only works clearly if they log off so I don't know if that would work in your situation. It is quicker to change group membership than rewrite an ACL over large amounts of data.
richbrowncardiff Posted October 16, 2017 Author Posted October 16, 2017 Thanks All great ideas. Like the idea of the remove group from share script will give it a go!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now