Automatically deny access of (Drives) to newly created user accounts


  1. Posts : 106
    Windows 10 Home 22H2
       #1

    Automatically deny access of (Drives) to newly created user accounts


    Hello,

    Firstly, hope I'm posting in the right section.

    I would like to know if this is actually possible, i.e. the ability to deny complete access of a specific drive/partition to a newly created user account (local) somewhere in the advanced security settings or via cmd. The current situation is that I have to manually access the advanced security tab of the concerned drive/partition, add/edit the new user account(s) and then deny access to them individually, requiring too many mouse clicks and admin password inputs each time.

    What I prefer instead is to be able to set up the security settings in a manner that would auto-disable access to all user accounts likely created in the future and allow access to only the currently enabled local/admin account.

    Thanks in advance.
      My Computer


  2. Posts : 8,103
    windows 10
       #2

    Welcome to the forum. Is this for a company and do you have a domain?
      My Computer


  3. Posts : 106
    Windows 10 Home 22H2
    Thread Starter
       #3

    Thank you.

    Actually, it's neither. It's just for my personal use. I just want the access denial for any guest/local accounts I may create in the future and not have to worry about the regular drill ( as in my opening post). Also, I'm on the Home edition, so not part of any domains.
      My Computer


  4. Posts : 106
    Windows 10 Home 22H2
    Thread Starter
       #4

    I guess it's safe to assume my requirement isn't possible since there are no more replies.

    edit: I found an alternative solution (via CMD) on your Windows 8 forums. Although not automatic, it greatly reduces the steps involved but can't seem to get it to work for some reason. It's as shown below:

    C:\WINDOWS\system32>icacls "s:" /grant "GUEST 2":N /T
    Invalid parameter "GUEST 2:N"

    C:\WINDOWS\system32>icacls "c:" /grant "GUEST 2":N /T
    Invalid parameter "GUEST 2:N"

    Tried prefixing the user name with the system name, i.e, "system name\GUEST 2":N /T. Also tried with other user names and still get the same error. Can't seem to figure out what the issue is.

    Any help's appreciated.
    Last edited by BRAC; 16 Jul 2017 at 05:57.
      My Computer


  5. Posts : 106
    Windows 10 Home 22H2
    Thread Starter
       #5

    This complete silence is rather baffling. I would appreciate a reply to the ICALS bit, at least. If not please feel free to close the thread.

    Many of us seek help here or other third party sites as the Windows forums are mostly useless with automated replies, mostly by those hanging on their dear jobs despite being incompetent.
      My Computer


  6. Posts : 5,478
    2004
       #6

    For icacls you want to deny all access rather than granting none.

    Code:
    C:\Windows\system32>net user
    
    User accounts for \\MACBOOK
    
    -------------------------------------------------------------------------------
    Hali                     Administrator            DefaultAccount
    dillo                    Guest                    guest 2
    The command completed successfully.
    
    
    C:\Windows\system32>icacls c:\temp /deny "guest 2":f
    processed file: c:\temp
    Successfully processed 1 files; Failed processing 0 files
    
    C:\Windows\system32>icacls c:\temp
    c:\temp MACBOOK\guest 2:(N)
            MACBOOK\Hali:(OI)(CI)(F)
            BUILTIN\Administrators:(OI)(CI)(F)
            NT AUTHORITY\SYSTEM:(OI)(CI)(F)
    
    Successfully processed 1 files; Failed processing 0 files
    
    C:\Windows\system32>


    Assuming your guest 2 user is a limited user (and not part of administrators group) then they will not be able to see other users files anyway. Denying access to volumes other than C would not be an issue but I really don't know what would happen if you tried to deny access to a user to the whole of the C drive. It would fail on paths you weren't authorized to for sure and taking ownership to overcome this would probably not be wise.
      My Computer


  7. Posts : 106
    Windows 10 Home 22H2
    Thread Starter
       #7

    @lx07

    Thanks a lot for your time.

    That minor change (which I never knew of) from grant to deny did the trick. And, you're right about C: drive being denied access. Also, you mentioned files not being accessible by guest users not part of administrator groups. In my case I was still able to navigate those drives when signed in as a guest. Anyway, all's well now.

    Thanks again.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:57.
Find Us




Windows 10 Forums