/usr/share/doc/cockpit/guide/feature-systemd.html is in cockpit-doc 164-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>systemd</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Cockpit Guide">
<link rel="up" href="features.html" title="Part II. Feature Internals">
<link rel="prev" href="features.html" title="Part II. Feature Internals">
<link rel="next" href="feature-journal.html" title="Journal">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="features.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="features.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cockpit Guide</th>
<td><a accesskey="n" href="feature-journal.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="feature-systemd"></a>systemd</h2></div></div></div>
<p>Cockpit uses
<a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/" target="_top">systemd</a>
and the DBus APIs it provides to configure and monitor core aspects of the system.
Use of alternate system APIs are not currently implemented.</p>
<p>For non root users, systemd controls access to its APIs via
<a class="link" href="privileges.html" title="Privileges and Permissions">Policy Kit</a> and a user logged into Cockpit will have
the same permissions as they do from the command line.</p>
<p>Cockpit retrieves information about the host and changes the hostname via the
<code class="code">hostnamed</code> daemon. To perform similar tasks from the command line use the
<a class="ulink" href="http://www.freedesktop.org/software/systemd/man/hostnamectl.html" target="_top"><code class="code">hostnamectl</code></a>
command:</p>
<pre class="programlisting">
$ <span class="command"><strong>hostnamectl</strong></span>
Static hostname: pink.example.com
Pretty hostname: Pink
Icon name: computer-desktop
Chassis: desktop
Machine ID: ef00b79be229463cbb844c3e715de96c
Boot ID: 934983d64d34465cb5a8383b5a89ad8c
Operating System: Fedora 22 (Twenty Two)
CPE OS Name: cpe:/o:fedoraproject:fedora:22
Kernel: Linux 4.0.4-301.fc22.x86_64
Architecture: x86-64
</pre>
<p>Cockpit configures the system time and time zone via the <code class="code">timedated</code> daemon.
To perform similar tasks from the command line use the
<a class="ulink" href="http://www.freedesktop.org/software/systemd/man/timedatectl.html" target="_top"><code class="code">timedatectl</code></a>
command:</p>
<pre class="programlisting">
$ <span class="command"><strong>timedatectl list-timezones</strong></span>
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
...
</pre>
<p>Cockpit can manage the list of NTP servers used by
<code class="code">systemd-timesyncd</code> by putting its own file into
<code class="code">/etc/systemd/timesynd.conf.d/</code>. Note that
<code class="code">systemd-timesyncd</code> is not always enabled, depending on
the configuration of the machine. In that case, Cockpit disabled the
UI for managing the list of NTP servers. In some cases use of
<code class="code">ntpd</code> can cause the <code class="code">timedated</code> daemon to
behave inconsistently with regards to time synchronization.</p>
<p>Cockpit restarts or powers down the machine by using the
<a class="ulink" href="http://www.freedesktop.org/software/systemd/man/shutdown.html" target="_top"><code class="code">shutdown</code></a>
command. To perform similar tasks from the command line, run it directly:</p>
<pre class="programlisting">
$ <span class="command"><strong>sudo shutdown +15</strong></span>
Shutdown scheduled for Sa 2015-09-26 15:49:40 CEST, use 'shutdown -c' to cancel.
</pre>
<p>Cockpit manages system services and sockets via systemd. To perform similar tasks from the
command line use the
<a class="ulink" href="http://www.freedesktop.org/software/systemd/man/systemctl.html" target="_top"><code class="code">systemctl</code></a>
command:</p>
<pre class="programlisting">
$ <span class="command"><strong>systemctl status cockpit</strong></span>
● cockpit.service - Cockpit Web Service
Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static; vendor preset: disabled)
Drop-In: /etc/systemd/system/cockpit.service.d
└─debug.conf
Active: active (running) since Sa 2015-09-26 13:28:02 CEST; 2h 7min ago
Docs: man:cockpit-ws(8)
Main PID: 6957 (cockpit-ws)
Memory: 1.8M
CGroup: /system.slice/cockpit.service
├─ 6957 /usr/libexec/cockpit-ws
└─29598 /usr/bin/ssh-agent
</pre>
<p>In order to customize who can perform various actions in system,
<a class="link" href="privileges.html#privileges-polkit" title="Customizing Polkit Privileges">create polkit rules</a> with the following
actions and details:</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="option">org.freedesktop.systemd1.manage-units</code></span></p></td>
<td><p>Permission to manage system services or other units.
Details available: <code class="code">unit</code>, <code class="code">verb</code></p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">org.freedesktop.systemd1.manage-unit-files</code></span></p></td>
<td><p>Permission to manage system services or other unit files.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">org.freedesktop.systemd1.reload-daemon</code></span></p></td>
<td><p>Permission to reload the systemd state.</p></td>
</tr>
</tbody>
</table></div>
<p>For example, placing the following polkit rule to
<code class="filename">/etc/polkit-1.rules.d/10-http.rule</code> allows all users in the
<code class="code">operators</code> group start, stop, and restart the Apache HTTP service:</p>
<pre class="programlisting">
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units") {
if (subject.isInGroup("operators") && action.lookup("unit") == "httpd.service") {
var verb = action.lookup("verb");
if (verb == "start" || verb == "stop" || verb == "restart") {
return polkit.Result.YES;
}
}
}
});
</pre>
</div>
<div class="footer"><hr></div>
</body>
</html>
|