Debian Codegraph @

doc/ja/lxc-usernsexec.sgml.in

raw
1 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
2
3 <!DOCTYPE refentry PUBLIC @docdtd@ [
4
5 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
6 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
7 ]>
8
9 <refentry>
10
11 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
12
13 <refmeta>
14 <refentrytitle>lxc-usernsexec</refentrytitle>
15 <manvolnum>1</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>lxc-usernsexec</refname>
20
21 <refpurpose>
22 <!--
23 Run a task as root in a new user namespace.
24 -->
25 新しいユーザ名前空間内で root としてタスクを実行する
26 </refpurpose>
27 </refnamediv>
28
29 <refsynopsisdiv>
30 <cmdsynopsis>
31 <command>lxc-usernsexec</command>
32 <arg choice="opt">-m <replaceable>uid-map</replaceable></arg>
33 <arg choice="req">-- command</arg>
34 </cmdsynopsis>
35 </refsynopsisdiv>
36
37 <refsect1>
38 <title><!-- Description -->説明</title>
39
40 <para>
41 <!--
42 <command>lxc-usernsexec</command> can be used to run a task as root
43 in a new user namespace.
44 -->
45 <command>lxc-usernsexec</command> は、新しいユーザ名前空間内で root としてタスクを実行するのに使います。
46 </para>
47
48 </refsect1>
49
50 <refsect1>
51
52 <title><!-- Options -->オプション</title>
53
54 <variablelist>
55
56 <varlistentry>
57 <term>
58 <option>-m <replaceable>uid-map</replaceable></option>
59 </term>
60 <listitem>
61 <para>
62 <!--
63 The uid map to use in the user namespace. Each map consists of
64 four colon-separate values. First a character 'u', 'g' or 'b' to
65 specify whether this map pertains to user ids, group ids, or
66 both; next the first userid in the user namespace; next the
67 first userid as seen on the host; and finally the number of
68 ids to be mapped.
69 -->
70 ユーザ名前空間内で使うための uid のマッピング。マッピングは、コロンで分けられた 4 つの値から構成されます。
71 最初の文字は 'u', 'g', 'b' のどれかで、マッピングが UID, GID, UID と GID の両方のうちのどれに関するものなのかを指定します。
72 次はユーザ名前空間内の最初の ID を指定します。その次はホスト上での最初の ID を指定します。最後はマッピングされる ID の数を指定します。
73 </para>
74 <para>
75 <!--
76 More than one map can be specified. If no map is
77 specified, then by default the full uid and gid ranges granted
78 by /etc/subuid and /etc/subgid will be mapped to the
79 uids and gids starting at 0 in the container.
80 -->
81 複数回のマッピングを指定することも可能です。もしマッピングを指定しない場合、デフォルトでは /etc/subuid, /etc/subgid で許可された全ての範囲の UID, GID が、コンテナ内の 0 から始まる UID, GID にマッピングされます。
82 </para>
83 <para>
84 <!--
85 Note that <replaceable>lxc-usernsexec</replaceable> always tries
86 to setuid and setgid to 0 in the namespace. Therefore uid 0 in
87 the namespace must be mapped.
88 -->
89 <replaceable>lxc-usernsexec</replaceable> は、常に名前空間内の 0 に setuid, setgid しようとしますので、名前空間内の UID 0 は必ずマッピングしなければいけないことに注意してください。
90 </para>
91 </listitem>
92 </varlistentry>
93
94
95 </variablelist>
96
97 </refsect1>
98
99 <refsect1>
100 <title><!-- Examples -->例</title>
101 <para>
102 <!--
103 To spawn a shell with the full allotted subuids mapped into
104 the container, use
105 <programlisting>
106 lxc-usernsexec
107 </programlisting>
108 To run a different shell than <replaceable>/bin/sh</replaceable>, use
109 <programlisting>
110 lxc-usernsexec &#045;&#045; /bin/bash
111 </programlisting>
112 -->
113 割り当てられた subuid の全てをコンテナ内にマッピングしてシェルを起動するには、
114 <programlisting>
115 lxc-usernsexec
116 </programlisting>
117 のようにしてください。<replaceable>/bin/sh</replaceable> とは違うシェルを起動する場合、
118 <programlisting>
119 lxc-usernsexec -- /bin/bash
120 </programlisting>
121 のようにしてください。
122 </para>
123 <para>
124 <!--
125 If your user id is 1000, root in a container is mapped to 190000, and
126 you wish to chown a file you own to root in the container, you can use:
127 <programlisting>
128 lxc-usernsexec -m b:0:1000:1 -m b:1:190000:1 &#045;&#045; /bin/chown 1:1 $file
129 </programlisting>
130 This maps your userid to root in the user namespace, and 190000 to uid 1.
131 Since root in the user namespace is privileged over all userids mapped
132 into the namespace, you are allowed to change the file ownership, which
133 you could not do on the host using a simple chown.
134 -->
135 あなたの UID が 1000 で、コンテナ内の root を 190000 にマッピングする場合で、あなたの所有するファイルをコンテナ内の root に chown したい場合は、以下のように実行します。
136 <programlisting>
137 lxc-usernsexec -m b:0:1000:1 -m b:1:190000:1 -- /bin/chown 1:1 $file
138 </programlisting>
139 これはあなたの UID をユーザ名前空間の root に、190000 を uid 1 にマッピングしています。
140 ユーザ名前空間内の root は、名前空間内の全ての ID に対して特権があるため、ホスト上で単純に chown を使えない場合でも、あなたはファイルのオーナーを変更する事が可能です。
141 </para>
142 </refsect1>
143
144 &seealso;
145
146 </refentry>
147
148 <!-- Keep this comment at the end of the file
149 Local variables:
150 mode: sgml
151 sgml-omittag:t
152 sgml-shorttag:t
153 sgml-minimize-attributes:nil
154 sgml-always-quote-attributes:t
155 sgml-indent-step:2
156 sgml-indent-data:t
157 sgml-parent-document:nil
158 sgml-default-dtd-file:nil
159 sgml-exposed-tags:nil
160 sgml-local-catalogs:nil
161 sgml-local-ecat-files:nil
162 End:
163 -->