User Rights Assignment (Gán quyền người dùng) là gì?
Là cơ chế trong Windows cho phép quản trị viên gán các đặc quyền (privileges) và quyền đăng nhập (logon rights) cho tài khoản người dùng hoặc nhóm. Quyết định: ai có thể làm gì trên máy tính/domain.
Hai loại quyền chính
- Privileges (Đặc quyền): Thực hiện hành động hệ thống: Shutdown, Change system time, Debug programs, Load drivers, Backup/Restore files, Take ownership...
- Logon Rights (Quyền đăng nhập): Loại đăng nhập được phép: Log on locally, Log on as a service, Log on as a batch job, Access this computer from the network, Deny logon locally...
Cách cấu hình User Rights Assignment
Cách 1: Local Group Policy Editor (gpedit.msc) - Cho máy độc lập
- Win + R →
gpedit.msc→ Enter. - Đường dẫn: Computer Configuration → Windows Settings → Security Settings → Local Policies → User Rights Assignment.
- Chuột phải policy cần sửa → Properties → Add User or Group / Remove.
Cách 2: Group Policy Management Console (GPMC) - Cho Domain
- Mở
gpmc.msctrên Domain Controller hoặc RSAT. - Tạo/Sửa GPO → Edit → cùng đường dẫn: Computer Configuration → Policies → Windows Settings → Security Settings → Local Policies → User Rights Assignment.
- Link GPO đến OU chứa máy tính/user cần áp dụng.
- Chạy
gpupdate /forcetrên client.
Các quyền quan trọng thường cấu hình
| Quyền (Policy Name) | Mô tả | Khuyến nghị |
|---|---|---|
| Access this computer from the network | Cho phép kết nối qua mạng (SMB, RPC...) | Chỉ cho nhóm cần thiết (Admins, Service Accounts) |
| Allow log on locally | Đăng nhập tại máy (console/RDP) | Users, Admins. Không cho Guest |
| Allow log on as a service | Chạy dịch vụ Windows | Chỉ Service Accounts chuyên dụng |
| Deny log on locally | Cấm đăng nhập tại máy | Guest, Service Accounts, High-risk accounts |
| Shut down the system | Tắt/khởi động lại máy | Admins, Operators |
| Change the system time | Đổi giờ hệ thống | Chỉ Admins (quan trọng cho log/Kerberos) |
| Debug programs | Gắn debugger vào tiến trình | Chỉ Developers/Admins trên máy dev |
| Take ownership of files or other objects | Chụp quyền sở hữu file/thư mục | Chỉ Admins |
Quản trị quyền trên Domain Controller
Đường dẫn GPO mặc định: Default Domain Controllers Policy → Computer Configuration → Policies → Windows Settings → Security Settings → Local Policies → User Rights Assignment. Không sửa trực tiếp Default Policy, hãy tạo GPO mới link đến OU Domain Controllers.
Phân quyền chia sẻ thư mục (Share/NTFS Permissions) - Bổ sung
User Rights Assignment khác với NTFS/Share Permissions:
- User Rights: Hành động cấp hệ thống (shutdown, debug, logon type).
- NTFS Permissions: Read/Write/Modify/Full Control trên file/thư mục.
- Share Permissions: Read/Change/Full Control qua mạng.
Cấu hình Share: Chuột phải thư mục → Properties → Sharing → Advanced Sharing → Permissions → Add user/group → cấp quyền.
Nguyên tắc Least Privilege (Đặc quyền tối thiểu)
- Chỉ gán quyền cần thiết tuyệt đối cho từng vai trò.
- Dùng Group thay vì user riêng lẻ.
- Review định kỳ (quý/năm) và dọn dẹp quyền thừa.
- Audit: Bật "Audit User Right Assignment" trong Advanced Audit Policy.