Role You are an expert in linux desktop systems with 16 years of experience with Ubuntu…
- User
Role
You are an expert in linux desktop systems with 16 years of experience with Ubuntu and Cinnamon.
Task
I want to configure a remote desktop server that can be accessed simultaneously be several users. Because of that I have to restrict access to critical systems, such as power management, network, etc. so that a normal user cannot change the settings. Please give me a list of such components and steps how to disable them.
- Assistant
Absolutely, this is a common scenario for shared Linux desktop environments, such as in schools, libraries, or remote workstations. Here’s a comprehensive guide tailored for Ubuntu with Cinnamon (or similar GNOME-based environments), focusing on multi-user remote desktop setups.
1. Critical System Components to Restrict
For a secure, multi-user remote desktop, you should restrict access to:
- Power Management (shutdown, reboot, suspend, hibernate)
- Network Settings (changing Wi-Fi, VPN, proxies, etc.)
- User and Group Management
- Software Installation/Removal
- System Updates
- Printers and Devices
- Mounting/Unmounting Drives
- Display Settings (optional, if you want to prevent resolution changes)
- System Settings (general access)
- Terminal Access (optional, if you want to prevent command-line access)
2. How to Restrict Access
A. Power Management
Prevent Shutdown/Reboot/Suspend for Normal Users
-
Polkit Rules
Create a custom polkit rule to restrict these actions.sudo nano /etc/polkit-1/localauthority/50-local.d/disable-shutdown.pklaAdd:
[Disable shutdown/reboot for non-admins] Identity=unix-group:users Action=org.freedesktop.login1.power-off;org.freedesktop.login1.reboot;org.freedesktop.login1.suspend;org.freedesktop.login1.hibernate ResultActive=noReplace
userswith the group your normal users belong to. -
Hide Power Options in Cinnamon Menu
Usedconf-editororgsettingsto hide these options:gsettings set org.cinnamon.desktop.session logout-shutdown false gsettings set org.cinnamon.desktop.session logout-reboot false
B. Network Settings
Prevent Network Changes
-
Polkit Rule for NetworkManager
sudo nano /etc/polkit-1/localauthority/50-local.d/disable-network.pklaAdd:
[Disable network management for non-admins] Identity=unix-group:users Action=org.freedesktop.NetworkManager.settings.modify.system ResultActive=no -
Remove Network Applet (Optional) You can remove the network applet from the Cinnamon panel for non-admin users.
C. User and Group Management
- Only allow
sudogroup to access user management tools. - Remove
users-adminor similar tools from the menu for normal users.
D. Software Installation/Removal
- Only allow
sudogroup to useapt,synaptic, orgnome-software. - Remove or hide software management tools from the menu for normal users.
E. System Updates
- Restrict update tools to admins only.
F. Printers and Devices
-
Use polkit to restrict printer management:
sudo nano /etc/polkit-1/localauthority/50-local.d/disable-printers.pkla[Disable printer management for non-admins] Identity=unix-group:users Action=org.opensuse.cupspkhelper.mechanism.* ResultActive=no
G. Mounting/Unmounting Drives
-
Restrict via polkit:
sudo nano /etc/polkit-1/localauthority/50-local.d/disable-mount.pkla[Disable mount for non-admins] Identity=unix-group:users Action=org.freedesktop.udisks2.filesystem-mount ResultActive=no
H. Display Settings
- Hide or restrict access to display settings via menu editing or dconf.
I. System Settings
-
Use
dconfto lock down settings:sudo apt install dconf-cliCreate a lock file:
sudo nano /etc/dconf/db/local.d/00-lockdownExample to lock background and screensaver:
[org/cinnamon/desktop/background] picture-uri='' [org/cinnamon/desktop/screensaver] picture-uri=''Then lock keys:
sudo nano /etc/dconf/db/local.d/locks/00-lockdown/org/cinnamon/desktop/background/picture-uri /org/cinnamon/desktop/screensaver/picture-uriUpdate dconf:
sudo dconf update
J. Terminal Access
- Remove terminal from the menu for normal users.
- Use
dconfto disable terminal launchers.
3. General Steps
-
Create a User Group for Normal Users
- E.g.,
usersorstudents.
- E.g.,
-
Apply Polkit Rules
- As above, for each component.
-
Edit Cinnamon Menu
- Use
alacarteormenulibreto hide system tools from normal users.
- Use
-
Lock Down Settings with dconf
- As above.
-
Test with a Normal User Account
- Ensure restrictions are effective.
4. Extra Security Tips
- Disable TTY logins if not needed (
/etc/securetty). - Restrict SSH to admins only.
- Use a firewall to limit network access.
- Regularly update your system and review user permissions.
5. References
If you need specific polkit rules or dconf settings for a particular component, let me know!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.