However this topic is old, it is still an issiue for me because i would like to
create levels in the administration of the servers we build.
root > Server Owner
admin > Server administrator
administrator > Server administrator (Windows Active Directory)
users > Userlevel
Please follow this procedure to make ik (almost) work:
Create a new group called “managers”
edit the “admin@yourserver.xx” user and remove the group “domain admin” from this user
Now instead of above, add the group “managers” to this user.
edit the “administraor@yourserver.xx” user and remove the group “domain admin” from this user
Now instead of above, add the group “managers” to this user.
( I have not tested if there were issiues with Windows AD / DC and user rights on this change )
Make sure the password of your “root” user is different than that from the admin / administrator
Also create “manager” user, grant this user to te new “managers” group only, and give it a password.
Also create “another” user, grant this user to te new “managers” group only, and give it a password.
NoW you’ll end up with the following
GOOD: A “root” user who can manage everything.
WRONG: An “admin” user who can manage everything!
WRONG: An “administrator” user who can change the password of the “admin” user!
WRONG: A “manager” user who can change the password of the “admin” user!
GOOD: An “Another” user who can only change its own password
In this situation members of the group “managers” can get acces to the admin account by changing
its password and then login as admin to mess up everything or worse!
To solve this problem you must change the following file:
//usr/share/nethesis/NethServer/Authorization/base.json
See Row 6 : “Subject”: [“root”, “admin”, “.groups HAS adm”],
Change to : “Subject”: [“root”, “.groups HAS adm”],
Now you will have:
GOOD: A “root” user who can manage everything.
GOOD: An “admin” user who has manager previleges (Users, Folders, Groups, Virtuals hosts, …)
GOOD: An “administrator” user who can change the password of the “admin” user!
GOOD: A “manager” user who can change the password of the “admin” user!
GOOD: An “Another” user who can only change its own password
In this scenario the user “manager” is the same as “admin” and thus not needed, the person who is
going to take care of the user management is going to be “admin” ( and for windows “administrator”.
The big difference:
Only the “root” user has access to the full server-manager to install software, change network
settings, add users to openVPN and so on…
Quick commandline fix: ( Copy and Paste )
mv //usr/share/nethesis/NethServer/Authorization/base.json //usr/share/nethesis/NethServer/Authorization/base.json.old
awk ‘{ if (NR == 6) print “"Subject": ["root", ".groups HAS adm"],”; else print $0}’ //usr/share/nethesis/NethServer/Authorization/base.json.old > //usr/share/nethesis/NethServer/Authorization/base.json
Fix 403 - Forbidden 1327681977+1327499272 @ “managers” dashboard.
The dashboard for “managers” has an error now, to fix this the same way as it was for users
you must change the following:
//usr/share/nethesis/NethServer/Module/Dashboard.php
See Row 40 : $isAdmin = ($user->hasCredential(‘username’) && in_array($user->getCredential(‘username’), array(‘admin’,‘root’)))
Change to : $isAdmin = ($user->hasCredential(‘username’) && in_array($user->getCredential(‘username’), array(‘root’)))
mv //usr/share/nethesis/NethServer/Module/Dashboard.php //usr/share/nethesis/NethServer/Module/Dashboard.php.old
awk ‘{ if (NR == 40) print "$isAdmin = ($user->hasCredential(’'‘username’'‘) && in_array($user->getCredential(’'‘username’'‘), array(’'‘root’'‘)))"; else print $0}’ //usr/share/nethesis/NethServer/Module/Dashboard.php.old > //usr/share/nethesis/NethServer/Module/Dashboard.php