| Server IP : 185.11.201.71 / Your IP : 192.168.7.18 Web Server : Apache/2.4.29 (Ubuntu) System : Linux tech-virtual-machine 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 User : tech ( 1000) PHP Version : 7.4.28 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/help/C/system-admin-guide/ |
Upload File : |
<page xmlns="http://projectmallard.org/1.0/"
xmlns:its="http://www.w3.org/2005/11/its"
type="topic" style="task"
id="dconf-lockdown">
<info>
<link type="guide" xref="user-settings#lockdown" />
<link type="guide" xref="setup" />
<!-- <link type="seealso" xref="dconf-profiles" />-->
<revision version="0.1" date="2012-05-21" status="review"/>
<revision pkgversion="3.8" date="2013-04-26" status="review"/>
<revision pkgversion="3.15" date="2015-02-13" status="review"/>
<credit type="author copyright">
<name>Ryan Lortie</name>
<email>desrt@desrt.ca</email>
<years>2012</years>
</credit>
<credit type="copyright editor">
<name>Ekaterina Gerasimova</name>
<email>kittykat3756@gmail.com</email>
<years>2013, 2015</years>
</credit>
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
<desc>Use the <em>lockdown</em> mode in <sys its:translate="no">dconf</sys>
to prevent users from changing specific settings.</desc>
</info>
<title>Lock down specific settings</title>
<!-- TODO: reveiw against dconf-custom-defaults.page -->
<p>To <em>lock down</em> a <sys its:translate="no">dconf</sys> key, you will
need to create a <file its:translate="no">locks</file> subdirectory in the
keyfile directory. The files inside this directory contain a list of keys to
lock. Just as with the
<!--<link xref="dconf-keyfiles">-->keyfiles<!--</link>-->, you may add any
number of files to this directory. Here is an example of what one might look
like:</p>
<steps>
<title>Lock a setting</title>
<item>
<p>Before you can lock down a key, you need to set it. This example shows
how to lock <link xref="desktop-background">a background setting</link>
once it has been set. At this point, you should have
<link xref="dconf-profiles">a <sys>user</sys> profile</link> and
<link xref="dconf-keyfiles">a keyfile</link> with the settings that you
want to lock down.</p>
</item>
<item>
<p>Create a directory named
<file its:translate="no">/etc/dconf/db/local.d/locks</file>.</p>
</item>
<item>
<p>Create a file in the
<file its:translate="no">/etc/dconf/db/local.d/locks/</file> directory
and list one key per line. For example, create
<file its:translate="no">/etc/dconf/db/local.d/locks/00_default-wallpaper</file>:</p>
<code its:translate="no">
# <span its:translate="yes">prevent changes to the background</span>
/org/gnome/desktop/background/picture-uri
/org/gnome/desktop/background/picture-options
/org/gnome/desktop/background/primary-color
/org/gnome/desktop/background/secondary-color
</code>
</item>
<include href="dconf-snippets.xml"
xpointer="xpointer(/*/*[@xml:id='dconf-update'])"
xmlns="http://www.w3.org/2001/XInclude"/>
</steps>
<note>
<p>As of <app its:translate="no">dconf</app> 0.7.4, lockdown is only
supported on a per-key basis for performance reasons; you may not yet lock
entire subpaths. There are plans to address this in future releases.</p>
</note>
</page>