Sponsored Content
Top Forums Shell Programming and Scripting Script to delete sudo access in redhat 5.4 Post 302891946 by ahamed101 on Monday 10th of March 2014 02:04:20 AM
Old 03-10-2014
To get you started.

Code:
#!/bin/bash

server_list=(10.0.0.25)
regex="user1\|user2\|user3"

for((i=0; i< ${#server_list[@]}; i++))
do
    ssh root@${server_list[$i]} "sed  -i.bak \"/$regex/d\" /etc/sudoers"
done

Note : -i is included which will edit the file inline, which also creates a backup file. Once you confirm this works locally, then you can go ahead with full fledged.

HTH
 

10 More Discussions You Might Find Interesting

1. Solaris

secure access using sudo

I just need to know what should be done on a login user so that no one can access it except through sudo i.e. telnet server login: user NO ACCESS telnet server login: mylogin sudo - user <any command> ACCESS GRANTED thanks (0 Replies)
Discussion started by: melanie_pfefer
0 Replies

2. Linux

sudo access verification

Hi All, I got lots of request with sudo, a manager request, verbal command, do this and do that. The problem with this kind of request is when I added that script and that. It will not be perfect, it's because I can't verify the userid sudo access, I can't reset their password as well, I... (2 Replies)
Discussion started by: itik
2 Replies

3. Shell Programming and Scripting

ONLY SU Sudo access

Hello All, I want to create a script that will do ONLY su to any user on the server with hpadmin login using sudo. Can anyone let me know how can it do it. Regards Ankit (1 Reply)
Discussion started by: ajaincv
1 Replies

4. UNIX for Dummies Questions & Answers

sudo/root access

I'm actually working with a Ubuntu-System here and have a question about executing a command with 'sudo'. I tried and got a error message like "not allowed". After this I logged in with 'sudo -s' and typed the command without 'sudo'. This worked well. Can please somebody explain me this... (0 Replies)
Discussion started by: daWonderer
0 Replies

5. Ubuntu

Restrict SUDO Access

Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Hi Folks, Please help me. I am bit struck here. Here is the OS info. Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux I have a... (17 Replies)
Discussion started by: explorer007
17 Replies

6. UNIX for Advanced & Expert Users

Help needed in sudo access

I want to give root access to a user called denielr on server - tsprd01, but do not want to share root password. I have sudoers configured already. He should have all access equal to root. I made this entry in /etc/sudoers, but it is not working denielr tsprd01 =(root) NOPASSWD: ALL I tried to... (2 Replies)
Discussion started by: solaris_1977
2 Replies

7. Red Hat

Sudo access issue

Hi, I have given access to user mwadmin in shudders file as : mwadmin ALL:NOPASSWD:/www/* /usr/* /opt/* However, not able to execute below command: sudo mkdir -p /usr/test password for mwadmin: Sorry, user mwadmin is not allowed to execute '/bin/mkdir -p /usr/test' as root. ... (4 Replies)
Discussion started by: saurau
4 Replies

8. UNIX for Dummies Questions & Answers

Inheriting SUDO access?

I had a question on users inheriting SUDO capabilities of another account. Let's say that there are three users A, B, and C. A has access to Sudo into B. B has access to Sudo into C. Does this give A access to sudo into B and then sudo into C. A -> B B -> C A -> B -> C ? Another example. My... (2 Replies)
Discussion started by: sbcopty
2 Replies

9. Shell Programming and Scripting

Using plink with sudo access

I have similar issue as mentioned in 167174-how-run-script-using-batch-file.html It works good, but the control is not coming back to source i tried adding exit to remote script. Thanks, Suresh (0 Replies)
Discussion started by: snsuresh
0 Replies

10. Shell Programming and Scripting

Script help on sudo access validation

hello I need help on this. The input is this. server system account name DBA account name x a p y b q z c r so i would like to check the sudo of the user is done or not. this is what i do to check it 1. login as root on server x 2.... (2 Replies)
Discussion started by: Kiran008
2 Replies
ABRT-CONFIGURATION(8)						    ABRT Manual 					     ABRT-CONFIGURATION(8)

NAME
abrt-configuration - dbus server for reading/writing ABRT configuration SYNOPSIS
abrt-configuration [-v[v]...] [-t NUM] DESCRIPTION
abrt-configuration allows other programs to read/write ABRT configuration over D-Bus. Normally abrt-configuration is started by D-Bus daemon on demand, and terminates after a timeout. The server listens on com.redhat.problem.configuration address on the system bus and exports the configuration as D-Bus objects identified by D-Bus path and D-Bus interface. The configuration objects are created from D-BUS Object Introspection XML files placed in /usr/share/problems/config/interfaces directory. Each file must contain exactly one node element with one interface element and the interface must contain only property elements. The node element must also have both com.redhat.problems.configuration.ConfFile and com.rehdat.problems.configuration.DefaultConfFile annotations elements which provide path to the working configuration file, where the changes are written, and to the default configuration file. property elements can also have the path annotations but they must be specified both or neither. 'propety's name must be equal to some option from the configuration files and its type must be one of the following D-Bus types: b,i,s,as. The server allows all users to read the configuration, but modifications are authorized over PolicyKit with com.redhat.problem.configuration.update policy. Example of the configuration XML file: <node name="/com/redhat/problems/configuration/ccpp"> <annotation name="com.redhat.problems.ConfFile" value="/etc/abrt/plugins/CCpp.conf" /> <annotation name="com.redhat.problems.DefaultConfFile" value="/usr/share/abrt/conf.d/plugins/CCpp.conf" /> <interface name="com.redhat.problems.configuration.ccpp"> <property name="MakeCompatCore" type="b" access="readwrite"/> <property name="SaveBinaryImage" type="b" access="readwrite"/> <property name="VerboseLog" type="i" access="readwrite"/> <property name="DebuginfoLocation" type="s" access="readwrite"/> </interface> </node> OPTIONS
-v Log more detailed debugging information. -t NUM Exit after NUM seconds of inactivity. AUTHORS
o ABRT team SEE ALSO
abrt.conf(5) abrt 2.1.11 06/18/2014 ABRT-CONFIGURATION(8)
All times are GMT -4. The time now is 06:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy