stages/users: support new users w/ duplicate uids
When adding a new user with a uid that already exists, the "-o", option needs to be added. Always do so when the uid is specified. A use case for this is e.g. an installer iso with a `install` user that has 0 (like root) for its uid (and gid).
This commit is contained in:
parent
04d3c0fc17
commit
3f14ace5c1
1 changed files with 1 additions and 1 deletions
|
|
@ -83,7 +83,7 @@ def getpwnam(root, name):
|
|||
def useradd(root, name, uid=None, gid=None, groups=None, description=None, home=None, shell=None, password=None):
|
||||
arguments = []
|
||||
if uid is not None:
|
||||
arguments += ["--uid", str(uid)]
|
||||
arguments += ["--uid", str(uid), "-o"]
|
||||
if gid is not None:
|
||||
arguments += ["--gid", str(gid)]
|
||||
if groups:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue