Sudo Command in Linux Using su is the simplest way to switch to the administrative account in the current login session. It should list all the related entires you added to that user and computer. Updated 3 min read The su (short for substitute or switch user) utility allows you to run commands with another user’s privileges, by default the root user. Then log in with the AD user and check: sudo -l SSSD refreshes its local cache with the updated rules every few hours, but the simplest way to test it is to just reboot the computer. Now set its attributes as follows:įor commands you can use specific entries as well, like /bin/less or whatever. For the sudoRole you can use any name you want - I stick with the computer name since I use per-computer rules. In this case, I create a sudoRole object under the sudoers OU. Let's assume I have a computer named foo32linux, a user called iffin and I want to let him run all commands with sudo on that comp. To create the sudoRole object you have to use ADSI Edit, but once created, you can use Active Directory Users and Computers to modify it. And then add a line like this: username ALL (ALL) NOPASSWD:/usr/bin/apt update, /usr/bin/apt upgrade. Now create the sudoers OU on your domain root, this OU will hold all the sudo settings for all your Linux workstations. For example, if you want the apt update and apt upgrade to be run without entering the password for sudo in Ubuntu, here’s what you need to do. Verify it with ADSI Edit: open the Schema naming context and look for the sudoRole class. Grab the latest release of sudo, get the doc/schema.ActiveDirectory file, then import it (make sure to modify the domain path according to your domain name): ldifde -i -f schema.ActiveDirectory -c "CN=Schema,CN=Configuration,DC=X" "CN=Schema,CN=Configuration,DC=ad,DC=foobar,DC=com" -j.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |