Skip to content

Commit 3d8ecf1

Browse files
authored
Fix 1591 - add user to wheel only when sudo (#3293)
1 parent 75b6bba commit 3d8ecf1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

archinstall/lib/installer.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,8 +1579,16 @@ def user_create(self, user: str, password: str | None = None, groups: list[str]
15791579

15801580
if not handled_by_plugin:
15811581
info(f'Creating user {user}')
1582+
1583+
cmd = f'arch-chroot {self.target} useradd -m'
1584+
1585+
if sudo:
1586+
cmd += ' -G wheel'
1587+
1588+
cmd += f' {user}'
1589+
15821590
try:
1583-
SysCommand(f'arch-chroot {self.target} useradd -m -G wheel {user}')
1591+
SysCommand(cmd)
15841592
except SysCallError as err:
15851593
raise SystemError(f"Could not create user inside installation: {err}")
15861594

0 commit comments

Comments
 (0)