Authenticate all members of 'root' group

mzch

New Member
Jan 25, 2010
25
0
1
Japan
Hi,

Now Proxmox VE 1.5 allows the only user whose primary group is 'root' to login. Does allowing all members of 'root' group have any problems? If not, is there something wrong with patches below?

Code:
--- PVE/Utils.pm.orig	2010-02-14 02:02:47.273012446 -0500
+++ PVE/Utils.pm	2010-02-14 01:57:48.862472843 -0500
@@ -181,6 +181,17 @@
 
     my ($name, $passwd, $uid, $gid) = getpwnam ($username);
     my $groupname = getgrgid($gid) || 'nogroup';
+    while (my ($g, $p, $i, $members) = getgrent()) {
+      if ($g == 'root') {
+        foreach my $u (split(/ /, $members)) {
+          if ($u == $username) {
+            $groupname = $g;
+            last;
+          }
+        }
+        last;
+      }
+    }
 
     # fixme: what groups are allowed?
     if ($groupname ne 'root') {
 
Last edited:
Now Proxmox VE 1.5 allows the only user whose primary group is 'root' to login. Does allowing all members of 'root' group have any problems? If not, is there something wrong with patches below?

Seems to work.
 
Good. I'll apply this until release of Proxmox VE 2.0. :)
Thanks.
 

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!