Disable Root Account

You can install a VM with Proxmox VE (nested virtualization), create a snapshot of it and then try all user changes that you can think of.
 
Sounds like a lot of overhead to me ;)

The question is: is the root account a built-in or is it not there by default. If it's a built-in account, is it safe to remove/disable it within the gui (as long as there are other accounts with similar permissions available of course).

Greetings
Lioh
 
We are using only dedicated user accounts with 2FA. I would like to disable/remove the root account because it is not associated to a user. If deleting is not supported, disabling would be also an option.
 
root is the linux root@pam user

the thing is a lot of options on PVE are permitted for root@pam user only, so disabling it would limit your options quite a bit.

you could remove the root password to achieve the same thing, that way you cannot login as root@pam directly but still be able to sudo to it from a shell (although i think you'd still be unable to use root@pam on the GUI)
 
For SSH it's not really an issue as we are limiting to key based access. Console login and gui is what it's about. So I am going to try to disable the root pw on Linux and see where the telephone will fall from the table
 
  • Like
Reactions: Elliott Partridge
For SSH it's not really an issue as we are limiting to key based access. Console login and gui is what it's about. So I am going to try to disable the root pw on Linux and see where the telephone will fall from the table
Where did the phone fall?

I am wanting to do the same so interested to hear how successful you were.

Graham
 
Also interested in what @Lioh uncovers, as we have a similar situation at work with users sourced from Active Directory, and most day-to-day operations can be achieved via non-root users. Root via local ssh is always a fallback for any advanced configuration changes or diagnostics.

Seems like if disabling root under Users in the web gui turns out to be a Bad Thing To Do™ then it shouldn't be allowed to be disabled. Just my 2c on user interface (not a designer by any means).
 
Last edited:
Just tried @Lioh idea of deleting root password on CLI, and seems to be working so far! root user still exists in Linux environment, and can be accessed with a privileged user. From GUI, root user fails to login. I'm interested to know if anyone experiences any issues, but so far none for me.
 
  • Like
Reactions: ZipTX
Hi guys,

I know it's old post, but i can write a little guide book. You need create a new account for manage your PVE and give the permission for administrator. You install sudoers function for give root access, add your new account to the sudoers configuration.

You can disable shell login in : /etc/passwd
Now you can disable login in pve web admin.

I add two screenshot in below, for see this.

bye
 

Attachments

  • passwd.png
    passwd.png
    1.3 KB · Views: 46
  • users.png
    users.png
    8.6 KB · Views: 41
Still the problem that some stuff (I think joining cluster and so on) is hardcoded to be only be usable by root. So later you might need to enable root again as another user with administrative privileges isn't a full replacement.
 
You can disable shell login in : /etc/passwd
I also see a problem in live migration, which needs to log in into other nodes and therefore be able to login.
Why don't you just do what @oguz said and disable the password?

Is the permission problem on root-only API endpoints is not fixed yet, so you crippled your system with this hack.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!