Create admin user: Difference between revisions
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
1. Create user: | 1. Create user: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
useradd -s /bin/bash - | VAR_USERNAME=<username> | ||
useradd -m -s /bin/bash -G sudo ${VAR_USERNAME} && pveum user add ${VAR_USERNAME}@pam | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 38: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
There are | 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