I have a development Ubuntu machine attached to our corporate domain. I have root permissions on this machine, however my ldap account does not. I would like to grant my ldap user unrestricted local admin rights on the system.
This system is used solely as a script execution engine for long-running tests, and as part of the execution it needs root access to the local system. This has been happily working for the last couple years as root. Now, new changes to our corporate infrastructure now require my scripts to run as my ldap user, which are breaking execution due to various permissions issues.
I have not been able to find anything on the internet that allows me to grant a ldap user full local admin rights on the local Ubuntu system. I do not want to add the user to sudoers
, I want it to have full local admin. I understand the risks with having my user be full admins, and I accept them. These are not production systems, and they are in a firewalled test environment.
I have tried the following with no luck:
Adding the user to the root group:
~# gpasswd -a umichscoots root
~# id umichscoots
uid=55144(umichscoots) gid=201(mts) groups=0(root),201(mts)
Forcing every ldap user's gid to 0:
~# echo 'map passwd gidNumber "0"' >> /etc/nslcd.conf
~# reboot
...
~# id umichscoots
uid=55144(umichscoots) gid=0(root) groups=0(root)
I was actually pretty hopeful with that last one but it didn't work. I am at a loss... can anyone help?
sudo
is the right way to go here. Sounds like you're trying to circumvent your organization's security policy just because it's new and annoying to you. I suggest you contact your IT Security department, which should be able to explain why that's a bad idea and how you can still get your job accomplished in the new scheme of things. If there absolutely must be an exception made in order to fulfill business requirements, they should also be able to walk you through requesting and documenting the exception.