Sponsored Content
Top Forums Shell Programming and Scripting Script help on sudo access validation Post 302971168 by Kiran008 on Sunday 17th of April 2016 03:45:24 AM
Old 04-17-2016
RedHat 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

Code:
1. login as root on server x
2. su - p (ie su - dba uid)
3. run sudo -u a -i ( ie to validte the sudo works on not)

How can i do this all all those rows from a admin-server where ssh keys for root are copied for server x,y & z

Last edited by jim mcnamara; 04-17-2016 at 12:26 PM..
 

10 More Discussions You Might Find Interesting

1. 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

2. AIX

sudo user access

I have installed sudo on AIX 6100-04 and want to know how do I set it up for a user to be able to run only some commands? I want to give the user the rights to only cd to certain directories and run the ls command to name a few? Are there any issues with running sudo when the user is forced to... (2 Replies)
Discussion started by: daveisme
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. Solaris

Sudo access in Solaris

Install the sudo pkg SFWsudo.tar bash#tar -xvf SFWsudo.tar bash#pkgadd -d . SFWsudo path may be /opt/sfw/bin Make entry the user name in sudoer file path of the sudoer file /opt/sfw/etc/sudoers check with the below command as a user (not as a root user) user1$... (1 Reply)
Discussion started by: Narendiran
1 Replies

8. Shell Programming and Scripting

Script to delete sudo access in redhat 5.4

Hi , This site is veryhelpful in resolving many issues.I have a request to delete sudo access for 3 users say user1,user2,user3 from around 50 servers in redhat 5.4.I know it is very time consuming to login to each server and delete entry in /etc/sudoers file.Is there any way can i do it... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

9. 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

10. 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
VIEW-OS(1)						      General Commands Manual							VIEW-OS(1)

NAME
viewsudo - execute a command as another (virtual) user SYNOPSIS
viewsudo [-g groupname|#gid] [-u username|#uid] command DESCRIPTION
viewsudo allows a user to execute a command as the superuser or another user in View-OS. OPTIONS
viewsudo accepts the following command line options: -g group Normally, viewsudo sets the primary group to root. The -g option causes sudo to run the specified command with the primary group set to group. To specify a gid instead of a group name, use #gid. When running commands as a gid, many shells require that the '#' be escaped with a backslash ('[u2019]). If no -u option is specified, the command will be run as the invoking user (not root). In either case, the primary group will be set to group. -u user The -u option causes viewsudo to run the specified command as a user other than root. To specify a uid instead of a user name, use #uid. When running commands as a uid, many shells require that the '#' be escaped with a backslash ('[u2019]). RETURN VALUES
Upon successful execution of a program, the exit status from viewsudo will simply be the exit status of the program that was executed. SEE ALSO
viewsu(1), sudo(1), linux.defs(5) AUTHORS
View-OS is a project of the Computer Science Department, University of Bologna. Project Leader: Renzo Davoli. <http://www.sourceforge.net/projects/view-os> Howto's and further information can be found on the project wiki <wiki.virtualsquare.org>. NOTE
Most part of the text is taken from sudo(1). VIEW-OS: a process with a view August 8, 2009 VIEW-OS(1)
All times are GMT -4. The time now is 01:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy