0

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?

  • 1
    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. – Iszi Jul 29 '14 at 21:38
1

You will have to add your user to the sudoers group.

There is only one root. (And it is named root.)

  • 1
    Well, technically there's also wheel. And IIRC he doesn't need to be in the sudoers group; just the sudoers file. His account / his group can be allocated fine-grained permissions in /etc/sudoers. – Parthian Shot Jul 29 '14 at 22:03
  • 2
    @ParthianShot Semantics aside, the point is that non-built-in accounts should never just be root. That's what sudo is for. – Iszi Jul 29 '14 at 22:41
  • @Iszi Oh, I agree. Just added the comment to clarify. – Parthian Shot Jul 30 '14 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.