0

Question solved:

I ended up using dconf since Ubuntu Desktop natively uses the GNOME desktop. For any people unfamiliar with it, you can edit dconf settings via terminal or GUI. I ended up doing it via the terminal with the use of the following link @steeldriver mentioned in a comment: https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en

Network settings will be locked behind a privilege wall by default I discovered after testing with a non-sudo account (stupid, i know..) so I did not have to adjust any settings on that.


For a school assignment I have been asked to lock the following three settings in place on both Windows and Linux workstations:

  • Network Configuration (e.g. not being able to change IP's, DNS servers)
  • Desktop Wallpaper
  • Trusted sites (for this question not relevant since Trusted Sites is a Internet Explorer specific feature)

I know I can do this via Windows with GPO's, but I am unsure how to push this with Ubuntu Server 19.04. There are programs like Chef and Ansible, but both seem like very big packages for just these two specific settings. The users will be working on Ubuntu Desktop 18.04.

The Ubuntu workstation will be joined to a Windows Server AD and will need access to network shares. I believe the AD-integration and Samba will be able to fulfill this need, but I am bending my head over the GPO part.

I looked into SSSD, but I can't find if these two specific GPO settings are supported within Linux.

Most ideally any new deployed workstations would automatically take over these settings, but I'm not sure if that is realistic. Should I look into a bash-script that automatically runs upon logging in to set these settings static?

5
  • 1
    1. Ubuntu server doesn't have a network manager. 2. Ubuntu server doesn't have a wallpaper or a desktop. Problem solved! Oct 14 '19 at 10:06
  • For the wallpaper, it's going to depend what desktop session your users are using - but in the case of gnome-based desktops at least, you can use dconf locks. See for example Lock down specific settings Oct 14 '19 at 10:17
  • @mikewhatever I mentioned the term workstations, so I was hoping for a solution for Ubuntu Desktop. Having users work via a terminal is not a solution unfortunately.
    – cediscal
    Oct 14 '19 at 10:34
  • I quote "...but I am unsure how to do this with Ubuntu Server 19.04. " Oct 14 '19 at 10:41
  • @mikewhatever My apologies, I further clarified the question. I was hoping for a Ubuntu Server to be able to push any rulesets to the Ubuntu Desktop workstations. If not possible, I would like to know what settings I can adjust locally to lock these settings down.
    – cediscal
    Oct 14 '19 at 10:48
0

There is 3 type of permissions that you can restricted to non-sudo users :

  • Read (r)
  • Write (w)
  • Execution (x)

Each files and folder had 3 "types" (I don't know how to spell it) :

  • Owner
  • Group (group where owner is)
  • Others

and also :

  • All

Each permission can be removed on a file with the following command :

sudo chmod -x /etc/passwd

In this example, I removed the execution permission for each user. If you want to remove only at others, just add the o before -x like that :

sudo chmod o-x /etc/passwd

So to summarize how to removed each permission, use the 1rst letter of the permission (same for who you want to affect) execution use the x instead of e

NB : to do it on a folder and his files inside, just dd the -R option (for recursivity), but be careful, it can destroy your OS

NB-2 : You can see current permission on files/folders with ls -l

Edit : Here is a link to remove the right to change Background Wallpaper

6
  • How does that help in restricting the wallpaper selected by the user? Oct 14 '19 at 10:26
  • @SimonSudler just need to remove rw permission on /usr/share/backgrounds folder (if it's on this folder into Ubuntu Server)
    – damadam
    Oct 14 '19 at 10:31
  • @damadam Could I use the same method to use a file down like Netplan, or would that still allow users to change settings via the GUI?
    – cediscal
    Oct 14 '19 at 10:36
  • @cediscal to be able to use a file down, you need to have rw permissions (or only w right if you just want to add another file)
    – damadam
    Oct 14 '19 at 10:47
  • @damadam on my gnome desktop, I can select a wallpaper from every location I want to... /usr/share/backgrounds is just the default location. vitux.com/8-ways-to-customize-your-ubuntu-desktop Oct 14 '19 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.