04.06.2013 Views

UCS 2.4 - Univention

UCS 2.4 - Univention

UCS 2.4 - Univention

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 <strong>Univention</strong> Configuration Registry<br />

<strong>Univention</strong> Configuration Registry must be executed via the command eval for <strong>Univention</strong> Configuration<br />

Registry variables to be able to be read in a shell script as environment variables:<br />

# eval $(univention-config-registry shell ldap/server/name)<br />

# echo $ldap_server_name<br />

master.firma.de<br />

14.4 Changing <strong>Univention</strong> Configuration Registry variables<br />

The command<br />

univention-config-registry set =""<br />

can be used to change a variable’s value. This initiates a syntax check. In the following example, the value<br />

of the variable nameserver1 is set to 192.168.0.1:<br />

univention-config-registry set nameserver1="192.168.0.1"<br />

The change to a <strong>Univention</strong> Configuration Registry variable results in all configuration files for which the<br />

<strong>Univention</strong> Configuration Registry variable is registered (see Chapter 14.8), being rewritten immediately.<br />

The files in question are output on the terminal output:<br />

# univention-config-registry set sshd/xforwarding=yes<br />

Setting sshd/xforwarding<br />

File: /etc/ssh/sshd_config<br />

In doing so it must be noted that although the configuration of a service is updated, the system service<br />

in question is not restarted automatically. These services must generally be restarted manually using the<br />

corresponding init scripts below /etc/init.d. The execution of scripts to follow changes to <strong>Univention</strong><br />

Configuration Registry variables is described in Chapter 14.10.<br />

If, for example, the debug level of the Samba service is changed, this must then be restarted:<br />

# univention-config-registry set samba/debug/level=2<br />

Setting samba/debug/level<br />

Multifile: /etc/samba/smb.conf<br />

# /etc/init.d/samba restart<br />

Stopping Samba daemons: nmbd smbd.<br />

Starting Samba daemons: nmbd smbd.<br />

Simultaneous changes to more than one variable are possible in one command line (in so far as they refer<br />

to the same configuration file, this will only be rewritten once):<br />

# univention-config-registry set \<br />

dns/forwarder1=192.168.0.2 \<br />

sshd/xforwarding="no" \<br />

sshd/port=2222<br />

280

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!