Skip to content

Commit

Permalink
Use useradd instead of adduser
Browse files Browse the repository at this point in the history
  • Loading branch information
kayoub5 committed Jan 4, 2024
1 parent 04f016d commit 37175e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Test/TestUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public static bool Create()
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Bash("adduser", Username);
Bash("adduser", Username, "sudo");
Bash("useradd", Username, "--groups", "sudo");
Bash("bash", "-c", $"\"echo -e {Username}:{Password} | chpasswd\"");
}
// OS not supported
Expand Down

0 comments on commit 37175e7

Please sign in to comment.