Fixed commands that require sudo
This commit is contained in:
parent
9325328bd8
commit
314bf18887
1 changed files with 4 additions and 4 deletions
|
@ -101,10 +101,10 @@ Note $ctuser is a placeholder, replace with your username
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Prepare a group id outside of the normal range
|
# Prepare a group id outside of the normal range
|
||||||
groupadd --gid 2000 $ctuser
|
sudo groupadd --gid 2000 $ctuser
|
||||||
# Create user with restrictions
|
# Create user with restrictions
|
||||||
# We need the $HOME to live in
|
# We need the $HOME to live in
|
||||||
useradd --create-home \
|
sudo useradd --create-home \
|
||||||
--shell /usr/bin/false \
|
--shell /usr/bin/false \
|
||||||
--password $ctuser_pw \
|
--password $ctuser_pw \
|
||||||
--no-user-group \
|
--no-user-group \
|
||||||
|
@ -113,9 +113,9 @@ useradd --create-home \
|
||||||
--uid 2000 \
|
--uid 2000 \
|
||||||
$ctuser
|
$ctuser
|
||||||
# Lock user from password login
|
# Lock user from password login
|
||||||
usermod --lock $ctuser
|
sudo usermod --lock $ctuser
|
||||||
# Add container sub-ids
|
# Add container sub-ids
|
||||||
usermod --add-subuids 200000-299999 --add-subgids 200000-299999 $ctuser
|
sudo usermod --add-subuids 200000-299999 --add-subgids 200000-299999 $ctuser
|
||||||
# Start $ctuser session at boot without login
|
# Start $ctuser session at boot without login
|
||||||
loginctl enable-linger $ctuser
|
loginctl enable-linger $ctuser
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue