Skip to content

Delete possibly existing user with same uid (or gid=Containeruseruid) #584

Description

@antalk2

# Delete possibly existing user with same uid

sed -i 's%:x:%:-:% ; /:0:0:/d ; /:$Containeruseruid:/d' /etc/passwd

/:$Containeruseruid:/d also deletes users with gid equal to $Containeruseruid

Using /:$Containeruseruid:[0-9]/d instead would require next field to start with a digit,
forcing $Containeruseruid to match the uid part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions