Sponsored Content
Full Discussion: sudo - command usage
Top Forums UNIX for Dummies Questions & Answers sudo - command usage Post 302555925 by Dev_Dev on Friday 16th of September 2011 06:25:17 AM
Old 09-16-2011
sudo - command usage

Hi,

I have few doubts regarding "sudo" command. It acutally allows access to other commands as a different user. It stands for "superuser do".

Now, we execute a command as
Code:
sudo su - oracle

Can you please tell me what does it do actually, thank you.

Last edited by vbe; 09-16-2011 at 08:30 AM..
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Sudo Usage level

Hi Admins, I have a Security question here. We have a bunch of users ( around 25) who needs to have sudo capabilities to run some jobs. I add them in the sudoers list, once confirmed their intention. Now im having a headache, who is accessing another persons home directory and who is... (2 Replies)
Discussion started by: killerserv
2 Replies

2. Solaris

Sudo for a command

I am trying to set up sudo for a command, but do not want to specify the arguments that can be passed into it. I want the user who is using sudo to be able to pass in the arguments they want. I am fairly sure I know how to do this with RBAC in Solaris 10, but for reasons I will not get into I... (1 Reply)
Discussion started by: synchro
1 Replies

3. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

4. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

5. UNIX for Advanced & Expert Users

Sudo command

Hello, What does the below sudo command provide access to, does it allow a user to su to any other user except root. sudo !/usr/bin/su * (1 Reply)
Discussion started by: sophos
1 Replies

6. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

7. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

8. Red Hat

Sudo command configs

I am wondering how to use SUDO command to allow only my account to run mount command as root. I have root privilege.:confused: (4 Replies)
Discussion started by: almirzaee
4 Replies

9. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

10. Shell Programming and Scripting

SUDO command in script

hi, can some one explain the sudo -n equivalent in AIX Thanks Venkat K (5 Replies)
Discussion started by: venky.b5
5 Replies
NFSTEST.HOST(1) 						nfstest.host 1.0.1						   NFSTEST.HOST(1)

NAME
nfstest.host - Host module DESCRIPTION
Provides a set of tools for running commands on the local host or a remote host, including a mechanism for running commands in the back- ground. It provides methods for mounting and unmounting from an NFS server and a mechanism to simulate a network partition via the use of 'iptables'. Currently, there is no mechanism to restore the iptables rules to their original state. CLASSES
class Host(baseobj.BaseObj) Host object Host() -> New Host object Usage: from nfstest.host import Host # Create host object for local host x = Host() # Create host object for remote host y = Host(host='192.168.0.11') # Run command to the local host x.run_cmd("ls -l") # Send command to the remote host and run it as root y.run_cmd("ls -l", sudo=True) # Run command in the background x.run_cmd("tcpdump", sudo=True, wait=False) .... .... # Stop command running in the background x.stop_cmd() # Mount volume using default options x.mount() # Unmount volume x.umount() Methods defined here: --------------------- __init__(self, **kwargs) Constructor Initialize object's private data. host: Hostname or IP address [default: localhost] user: User to log in to host [default: ''] server: NFS server name or IP address [default: None] nfsversion: NFS version [default: 4] minorversion: NFS minor version [default: 1] port: NFS server port [default: 2049] export: Exported file system to mount [default: '/'] mtpoint: Mount point [default: '/mnt/t'] datadir: Data directory where files are created [default: ''] mtopts: Mount options [default: 'hard,rsize=4096,wsize=4096'] interface: Network device interface [default: 'eth0'] nomount: Debug option so the server is not actually mounted [default: False] iptables: Iptables command [default: '/usr/sbin/iptables'] sudo: Sudo command [default: '/usr/bin/sudo'] mount(self, **kwargs) Mount the file system on the given mount point. server: NFS server name or IP address [default: self.server] nfsversion: NFS version [default: self.nfsversion] minorversion: NFS minor version [default: self.minorversion] port: NFS server port [default: self.port] export: Exported file system to mount [default: self.export] mtpoint: Mount point [default: self.mtpoint] datadir: Data directory where files are created [default: self.datadir] mtopts: Mount options [default: self.mtopts] Return the mount point. network_drop(self, ipaddr, port) Simulate a network drop by dropping all tcp packets going to the given ipaddr and port using the iptables commands. network_reset(self) Reset the network by flushing all the chains in the table using the iptables command. run_cmd(self, cmd, sudo=False, dlevel='DBG1', msg='', wait=True) Run the command to the remote machine using ssh. There is no user authentication, so remote host must allow ssh connection without any passwords for the user. For a localhost the command is just executed and ssh is not used. The object for the process of the command is stored in object attribute 'self.process' to be used by methods wait_cmd() and stop_cmd(). The standard output of the command is also stored in the object attribute 'self.pstdout' while the standard error output of the command is stored in 'self.pstderr'. cmd: Command to execute sudo: Run command using sudo if option is True dlevel: Debug level for displaying the command to the user msg: Prefix this message to the debug message to be displayed wait: Wait for command to complete before returning Return the standard output of the command and the return code or exit status is stored in the object attribute 'self.returncode'. stop_cmd(self, process=None, dlevel=None, msg='') Terminate command started by run_cmd() by calling wait_cmd() with the 'terminate' option set to True. process: The object for the process of the command to terminate, or terminate all commands started by run_cmd() if this option is not given dlevel: Debug level for displaying the command to the user, default is the level given by run_cmd() msg: Prefix this message to the debug message to be displayed Return the exit status of the last command sudo_cmd(self, cmd) Prefix the SUDO command if effective user is not root. umount(self) Unmount the file system. wait_cmd(self, process=None, terminate=False, dlevel=None, msg='') Wait for command started by run_cmd() to finish. process: The object for the process of the command to wait for, or wait for all commands started by run_cmd() if this option is not given terminate: If True, send a signal to terminate the command or commands and then wait for all commands to finish dlevel: Debug level for displaying the command to the user, default is the level given by run_cmd() msg: Prefix this message to the debug message to be displayed Return the exit status of the last command Static methods defined here: ---------------------------- get_ip_address(host='', ipv6=False) Get IP address associated with the given host name. This could be run as an instance or class method. SEE ALSO
baseobj(1) BUGS
No known bugs. AUTHOR
Jorge Mora (mora@netapp.com) NFStest 1.0.2 10 April 2013 NFSTEST.HOST(1)
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy