Create admin user: Difference between revisions

From Jwiki
No edit summary
No edit summary
Line 2: Line 2:


1. Create user:
1. Create user:
os level


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
useradd -s /bin/bash -m <user>
VAR_USERNAME=<username>
</syntaxhighlight>
useradd -m -s /bin/bash -G sudo ${VAR_USERNAME} && pveum user add ${VAR_USERNAME}@pam


pve level
<syntaxhighlight lang="bash">
pveum user add <user>@pam
</syntaxhighlight>
</syntaxhighlight>


Line 38: Line 31:
</syntaxhighlight>
</syntaxhighlight>


There are use cases when you need it, to enable
There are usecases when you need it, to enable


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
pveum user modify root@pam --enable 1
pveum user modify root@pam --enable 1
</syntaxhighlight>
</syntaxhighlight>

Revision as of 17:46, 13 February 2025


1. Create user:

VAR_USERNAME=<username>
useradd -m -s /bin/bash -G sudo ${VAR_USERNAME} && pveum user add ${VAR_USERNAME}@pam

2. Create the group:

pveum group add admin -comment "System Administrators"


pveum acl modify / -group admin -role Administrator


3. Assign group to user:

pveum user modify <user>@pam -group admin

3+1. Disable root on gui (optional):

pveum user modify root@pam --enable 0

There are usecases when you need it, to enable

pveum user modify root@pam --enable 1