containerd / containerd/nerdctl

Cannot run `useradd` command in a container created by nerdctl+kata.

Open
#2,921 2 comments 0 reactions 0 assignees View on GitHub
kind/external question status/needs-more-information
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### Description

I cannot run the command `useradd` in my host, as seen below:
![image](https://github.com/containerd/nerdctl/assets/79980563/a5a9d979-b4c1-4dde-8209-b0be3e503e71)

For the purpose of learning, I want to create new user in my server. Hence, I use nerdctl + kata container to create a container in rootfull mode. However, in this container, I still cannot run the `useradd` command, as seen below:
![image](https://github.com/containerd/nerdctl/assets/79980563/72f99780-8eed-4b09-8d06-c0389b03ffcc)

So how to fix it? Thank you very much!

### Steps to reproduce the issue

1. run `nerdctl run -it --runtime io.containerd.kata.v2 ubuntu:20.04 sh` to enter a container.
2. run `su` to enter the root mode in the container.
3. execute `useradd`, and then it raises the problem.

### Describe the results you received and expected

I want to have the totally full root authority in my container created by nerdctl + kata.

### What version of nerdctl are you using?

nerdctl: 1.7.5
kata: 3.3.0

### Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

### Host information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.