Skip to content

UID/GIDを指定できるようにした#38

Open
toru-fukaya wants to merge 9 commits intomasterfrom
37-set-uid-gid
Open

UID/GIDを指定できるようにした#38
toru-fukaya wants to merge 9 commits intomasterfrom
37-set-uid-gid

Conversation

@toru-fukaya
Copy link
Collaborator

@toru-fukaya toru-fukaya commented Jun 4, 2024

After #35
Close #37

@kei1107
Copy link
Contributor

kei1107 commented Sep 1, 2024

useradd.arg("-g").arg(gid);
}
let useradd = useradd.arg(user_name).output()?;
from_command_status("useradd", useradd.status)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create host 1000 1001などで、gidとuidが違う時にここで失敗したらグループのゴミが残るので、create_group済みならgroupdelしといたほうがよさそうです。

$ tail /etc/group -n1
keisuke.kimura:x:1001:

Copy link
Contributor

@kei1107 kei1107 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他よさそうです。 (cc : @vorj )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UID/GIDを指定できるようにしてほしい

3 participants