Разрешить доступ к определенным папкам для гостевого пользователя в Windows 7

2785
Firee

Я только что включил гостевую учетную запись в моей системе Windows 7 (64-битная). Вот что мне нужно, чтобы пользователь Гость не имел / не должен иметь:

  1. Гость не должен иметь доступа к диску D: (любой другой диск, кроме C :)

  2. Но на диске D: есть определенные папки, для которых я хочу предоставить ему доступ «Чтение». Кроме того, он должен видеть только эти конкретные папки, и ничего больше.

0

2 ответа на вопрос

1
and31415

Solution

The following procedure will assume you're using the built-in Guest account, and that its profile path is C:\Users\Guest.

Preliminary steps

  1. Log on with the Guest account, and then log off. This is just to ensure the profile gets initialized, in case it's not already.

  2. Log on with an administrator account, and open an elevated command prompt.

Hide and prevent access to any drive but C: from My Computer

Type or paste the following commands in the command prompt, pressing Enter each time:

reg load "HKU\Guest" "%SystemDrive%\Users\Guest\NTUSER.DAT" reg add "HKU\Guest\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /t REG_DWORD /d 0x3fffffb /f reg add "HKU\Guest\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 0x3fffffb /f reg unload "HKU\Guest" 

Deny access to drives and all their subfolders

  1. Type or paste the commands below, and then press Enter:

    takeown /f D: /a icacls D: /deny *S-1-5-32-546:(OI)(CI)(F) 
  2. Repeat step 1 for any other drive you want to restrict by replacing D: with the actual letter.

Grant read and execute access to specific folders

  1. Execute the following command:

    icacls "D:\SomeFolder" /grant:r *S-1-5-32-546:(OI)(CI)(RX) 
  2. Repeat the previous step for all other folders you want to make available to the Guest account.

Create junction points in C: drive to access specific folders

  1. Create a dedicated container by running these commands:

    md "C:\GuestDrive" icacls "C:\GuestDrive" /grant:r *S-1-5-32-546:(OI)(CI)(RX) 
  2. Create a junction point to access the actual folder:

    mklink /j "C:\GuestDrive\SomeFolder" "D:\SomeFolder" 
  3. Repeat step 2 for any other required folder.

References

Работал так, как я хотел Firee 10 лет назад 0
-1
user301746

Почему бы не сопоставить те папки, которые вы бы хотели видеть гостем, как новые буквы дисков и предоставить пользователю доступ к ним? Затем вы можете скрыть диск D.

Не могли бы вы рассказать немного подробнее. Также я не знаю, стоит ли создавать новые диски для определенных папок. Firee 10 лет назад 0