]>
Commit | Line | Data |
---|---|---|
2b371b26 SY |
1 | <!-- |
2 | ||
3 | lxc: linux Container library | |
4 | ||
5 | (C) Copyright IBM Corp. 2007, 2008 | |
6 | ||
7 | Authors: | |
8 | Daniel Lezcano <daniel.lezcano at free.fr> | |
9 | Serge Hallyn <serge.hallyn at ubuntu.com> | |
10 | ||
11 | This library is free software; you can redistribute it and/or | |
12 | modify it under the terms of the GNU Lesser General Public | |
13 | License as published by the Free Software Foundation; either | |
14 | version 2.1 of the License, or (at your option) any later version. | |
15 | ||
16 | This library is distributed in the hope that it will be useful, | |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | Lesser General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU Lesser General Public | |
22 | License along with this library; if not, write to the Free Software | |
23 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
24 | ||
25 | Translated into Korean | |
26 | by Sungbae Yoo <sungbae.yoo at samsung.com> | |
27 | --> | |
28 | ||
29 | <!DOCTYPE refentry PUBLIC @docdtd@ [ | |
30 | ||
31 | <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml"> | |
32 | <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> | |
33 | ]> | |
34 | ||
35 | <refentry> | |
36 | ||
37 | <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo> | |
38 | ||
39 | <refmeta> | |
40 | <refentrytitle>lxc-usernsexec</refentrytitle> | |
41 | <manvolnum>1</manvolnum> | |
42 | </refmeta> | |
43 | ||
44 | <refnamediv> | |
45 | <refname>lxc-usernsexec</refname> | |
46 | ||
47 | <refpurpose> | |
48 | <!-- | |
49 | Run a task as root in a new user namespace. | |
50 | --> | |
51 | 새로운 사용자 네임스페이스에서 root로 태스크를 실행 | |
52 | </refpurpose> | |
53 | </refnamediv> | |
54 | ||
55 | <refsynopsisdiv> | |
56 | <cmdsynopsis> | |
57 | <command>lxc-usernsexec</command> | |
58 | <arg choice="opt">-m <replaceable>uid-map</replaceable></arg> | |
59 | <arg choice="req">-- command</arg> | |
60 | </cmdsynopsis> | |
61 | </refsynopsisdiv> | |
62 | ||
63 | <refsect1> | |
64 | <title><!-- Description -->설명</title> | |
65 | ||
66 | <para> | |
67 | <!-- | |
68 | <command>lxc-usernsexec</command> can be used to run a task as root | |
69 | in a new user namespace. | |
70 | --> | |
71 | <command>lxc-usernsexec</command>는 새로운 사용자 네임스페이스에서 루트로 태스크를 실행한다. | |
72 | </para> | |
73 | ||
74 | </refsect1> | |
75 | ||
76 | <refsect1> | |
77 | ||
78 | <title><!-- Options -->옵션</title> | |
79 | ||
80 | <variablelist> | |
81 | ||
82 | <varlistentry> | |
83 | <term> | |
84 | <option>-m <replaceable>uid-map</replaceable></option> | |
85 | </term> | |
86 | <listitem> | |
87 | <para> | |
88 | <!-- | |
89 | The uid map to use in the user namespace. Each map consists of | |
90 | four colon-separate values. First a character 'u', 'g' or 'b' to | |
69ba0789 | 91 | specify whether this map pertains to user ids, group ids, or |
2b371b26 SY |
92 | both; next the first userid in the user namespace; next the |
93 | first userid as seen on the host; and finally the number of | |
94 | ids to be mapped. | |
95 | --> | |
96 | 사용자 네임스페이스에서 사용될 uid 맵. 각각의 맵은 4개의 콜론(:)으로 구분된 값들로 구성되어 있다. 첫 번째는 'u', 'g', 'b' 문자로 각각 UID, GID, 또는 UID 및 GID 를 가리킨다. 그 다음은 사용자 네임스페이스 내에서의 UID, 그다음은 호스트의 UID, 그리고 마지막으로 매핑할 ID의 수를 지정한다. | |
97 | </para> | |
98 | <para> | |
99 | <!-- | |
100 | More than one map can be specified. If no map is | |
101 | specified, then by default the full uid and gid ranges granted | |
102 | by /etc/subuid and /etc/subgid will be mapped to the | |
103 | uids and gids starting at 0 in the container. | |
104 | --> | |
105 | 맵은 1개 이상도 지정가능하다. 만약 맵이 지정되지 않았다면, 기본값은 /etc/subuid와 /etc/subgid에서 허용된 모든 범위의 uid, gid가 컨테이너 내에서 0번부터 매핑된다. | |
106 | </para> | |
107 | <para> | |
108 | <!-- | |
109 | Note that <replaceable>lxc-usernsexec</replaceable> always tries | |
110 | to setuid and setgid to 0 in the namespace. Therefore uid 0 in | |
111 | the namespace must be mapped. | |
112 | --> | |
113 | <replaceable>lxc-usernsexec</replaceable>는 언제나 0번 setuid와 setgid를 시도한 다는 것에 주의해야 한다. 그러므로 네임스페이스 내에서 uid 0은 매핑이 되어있어야 한다. | |
114 | </para> | |
115 | </listitem> | |
116 | </varlistentry> | |
117 | ||
118 | ||
119 | </variablelist> | |
120 | ||
121 | </refsect1> | |
122 | ||
123 | <refsect1> | |
124 | <title><!-- Examples -->예제</title> | |
125 | <para> | |
126 | <!-- | |
127 | To spawn a shell with the full allotted subuids mapped into | |
128 | the container, use | |
129 | <programlisting> | |
130 | lxc-usernsexec | |
131 | </programlisting> | |
132 | To run a different shell than <replaceable>/bin/sh</replaceable>, use | |
133 | <programlisting> | |
134 | lxc-usernsexec -- /bin/bash | |
135 | </programlisting> | |
136 | --> | |
137 | 할당된 모든 subuid를 컨테이너에 매핑해서 쉘을 실행하려면, | |
138 | <programlisting> | |
139 | lxc-usernsexec | |
140 | </programlisting> | |
141 | 를 사용하면 된다. | |
142 | <replaceable>/bin/sh</replaceable>대신 다른 쉘을 실행하려면, | |
143 | <programlisting> | |
144 | lxc-usernsexec -- /bin/bash | |
145 | </programlisting> | |
146 | 를 사용하면 된다. | |
147 | </para> | |
148 | <para> | |
149 | <!-- | |
150 | If your user id is 1000, root in a container is mapped to 190000, and | |
151 | you wish to chown a file you own to root in the container, you can use: | |
152 | <programlisting> | |
153 | lxc-usernsexec -m b:0:1000:1 -m b:1:190000:1 -- /bin/chown 1:1 $file | |
154 | </programlisting> | |
155 | This maps your userid to root in the user namespace, and 190000 to uid 1. | |
156 | Since root in the user namespace is privileged over all userids mapped | |
157 | into the namespace, you are allowed to change the file ownership, which | |
158 | you could not do on the host using a simple chown. | |
159 | --> | |
160 | 만약 현재 UID가 1000이고, 컨테이너의 root가 190000으로 매핑되어 있으며, 현재 사용자가 소유하고 있는 파일을 컨테이너의 root가 소유하도록 하려면, 아래처럼 하면 된다. | |
161 | <programlisting> | |
162 | lxc-usernsexec -m b:0:1000:1 -m b:1:190000:1 -- /bin/chown 1:1 $file | |
163 | </programlisting> | |
164 | 이것은 현재 UID를 사용자 네임스페이스 내에서 root로 하고, 190000을 uid 1로 매핑한다. | |
165 | 사용자 네임스페이스의 root는 네임스페이스의 모든 UID에 권한이 있기 때문에, 호스트에서 chown을 사용할 수 없더라도 파일의 소유자를 변경할 수 있다. | |
166 | </para> | |
167 | </refsect1> | |
168 | ||
169 | &seealso; | |
170 | ||
171 | <refsect1> | |
172 | <title><!-- Author -->저자</title> | |
173 | <para>Serge Hallyn <email>serge.hallyn@ubuntu.com</email></para> | |
174 | </refsect1> | |
175 | ||
176 | </refentry> | |
177 | ||
178 | <!-- Keep this comment at the end of the file | |
179 | Local variables: | |
180 | mode: sgml | |
181 | sgml-omittag:t | |
182 | sgml-shorttag:t | |
183 | sgml-minimize-attributes:nil | |
184 | sgml-always-quote-attributes:t | |
185 | sgml-indent-step:2 | |
186 | sgml-indent-data:t | |
187 | sgml-parent-document:nil | |
188 | sgml-default-dtd-file:nil | |
189 | sgml-exposed-tags:nil | |
190 | sgml-local-catalogs:nil | |
191 | sgml-local-ecat-files:nil | |
192 | End: | |
193 | --> |