Root login

Chriswiss

Well-Known Member
Mar 14, 2017
65
5
48
36
Good evening,

Is it possible to disable the root user for connecting to the GUI?

Regards
Christophe
 
Hi,

this is not possible, why you like to do this?
 
Yes fail2ban this is one of the first things done when starting the server.
You talk about double authentication with otp. On PVE I do it without problem. Off on PMG I do not see the option. The oathkeygen command is not taken into account on PMG.

Regards
Christophe
 
You can use the pam module: See here https://developers.yubico.com/yubico-pam/
Get a API Client ID: https://upgrade.yubico.com/getapikey/

In debian stretch it's just:
# apt-get install libpam-yubico

Create a yubikey mapping file /etc/yubikey_mappings
<first user name>:<Yubikey token ID1>:<Yubikey token ID2>:….
<second user name>:<Yubikey token ID3>:<Yubikey token ID4>:….


# vi /etc/pam.d/auth_common

Add first line after comments:
auth required pam_yubico.so id=[Your API Client ID] authfile=/etc/yubikey_mappings

Find that line and add try_first_pass
auth [success=1 default=ignore] pam_unix.so nullok_secure try_first_pass

done - GUI and all other pam authentication (ssh, su, ....) is protected.

PS: Test with a non root user first. If it does not work for root (or ur key get lost), u can always login via console and recovery mode.
FW settings https/out to Yubico Auth Servers should be allowed.
 

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!