Sponsored Content
Full Discussion: Help on Ssh using sudo
Special Forums Cybersecurity Help on Ssh using sudo Post 302913563 by Perderabo on Monday 18th of August 2014 01:04:30 PM
Old 08-18-2014
You are going about this all wrong. Give everyone his own account. On each system, create an admin group. Give the admin group root power via sudo by adding a line to sudoers like this:

Code:
%admin ALL=(ALL) NOPASSWD: ALL

If a user should be able to access a system at all, add his private account to that system. If he needs root access as well, add his account to the admin group. Now he can log on to the box and them use sudo to obtain root authority.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

xwindows over ssh after sudo?

ok...I'm stumped on this one. I cannot figure out how to carry over my environment variables with a sudo command. I need to install an application under root and only have sudo access to get there. I can use ssh -Y <host> and launch an xwindows session successfully as myself but as soon as I sudo... (3 Replies)
Discussion started by: scottsl
3 Replies

2. UNIX for Advanced & Expert Users

sudo and ssh

Hello, Can you config sudo to use the passphrase in the user ssh-key instead of the one in the passwd? Some users do not have local passwords on the system and instead of adding the NOPASSWD in sudoers I would like the solution I asked about above. Thx Jocke (3 Replies)
Discussion started by: jOOc
3 Replies

3. UNIX for Advanced & Expert Users

sudo and ssh

Hi, I would like to know how i can perform a task, while performing ssh, sudo and command at the same time. What I generally do is I ssh to the server, where i created private and public, so it does not prompt me for password all the time. Then i need to run "sudo su - ldaprole" to get into... (9 Replies)
Discussion started by: john_prince
9 Replies

4. UNIX for Advanced & Expert Users

ssh and sudo login

Hi, I am trying to execute some command, via ssh and sudo. Here is what i want to do. ssh localhost | sudo su - ldaprole | ls -ltrh However, this command gives me listing of my home directory, and not of ldaprole. If I logic directly, when i perform sudo su - ldaprole, it... (5 Replies)
Discussion started by: john_prince
5 Replies

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

6. Programming

Using Commands over SSH using Sudo

Is there a way to transfer my sudo password via ssh so that I can copy files remotely and pass them locally, so: cat sudo-passwd-file|ssh -t user@10.7.0.180 'sudo find / -depth|cpio -oacv|gzip' > /path/to/dir/file.cpio.gz I am in the process of a creating a script. Everytime I try and just... (16 Replies)
Discussion started by: metallica1973
16 Replies

7. Red Hat

Sudo Password Prompt over SSH

I am not sure what I am missing here. I have the following identical entry in /etc/sudoers on multiple Red Hat 6.4 servers. icinga ALL=NOPASSWD:/usr/bin/yum --security --exclude\="kernel*" check-update On one server when I enter the command over SSH as follows it works fine. ssh -t -q... (1 Reply)
Discussion started by: scotbuff
1 Replies

8. Shell Programming and Scripting

Ssh & sudo

when the following command is issued the command prompt is received, how do I get past this? ssh -t usera@hosta sudo su - userb -c id (4 Replies)
Discussion started by: squrcles
4 Replies

9. Shell Programming and Scripting

Help in creating Sudo ssh script

Hi Experts, I am new to Shell scripting. I want to login to a server using a script. The normal command I use is --> sudo ssh <Servername> . when i tried putting this into a txt format file and tried running, it throw an error "can't execute". I am an Admin and i have root access. Any help would... (6 Replies)
Discussion started by: Tom1989
6 Replies

10. Shell Programming and Scripting

Ssh does not support sqlplus and sudo -i?

Hey everybody, currently I am having an issue that I need to open an ssh session to a remote host, once on the remote host I need to use sudo and then execute sqlplus. Once the sqlplus call is open I need to execute one command while the sqlplus is active. For example show sga. I already got so... (3 Replies)
Discussion started by: h1kelds
3 Replies
myproxy-admin-change-pass(8)					      MyProxy					      myproxy-admin-change-pass(8)

NAME
myproxy-admin-change-pass - change credential passphrase SYNOPSIS
myproxy-admin-change-pass [ options ] DESCRIPTION
The myproxy-admin-change-pass command changes the passphrase used to encrypt a credential in the MyProxy repository. The command first prompts for the current passphrase for the credential, then prompts twice for the new passphrase. If an empty passphrase is given, the credential will not be encrypted. It accesses the repository directly and must be run on the machine where the myproxy-server(8) is installed from the account that owns the repository. OPTIONS
-h Displays command usage text and exits. -u Displays command usage text and exits. -s dir Specifies the location of the credential storage directory. The directory must be accessible only by the user running the myproxy- server process for security reasons. Default: /var/lib/myproxy or /var/myproxy or $GLOBUS_LOCATION/var/myproxy -l username Specifies the MyProxy account under which the credential should be stored. -k name Specifies the credential name. -S, --stdin_pass By default, the command prompts for a passphrase and reads the passphrase from the active tty. When running the command non-inter- actively, there may be no associated tty. Specifying this option tells the command to read passphrases from standard input without prompts or confirmation. EXIT STATUS
0 on success, >0 on error AUTHORS
See http://myproxy.ncsa.uiuc.edu/about for the list of MyProxy authors. SEE ALSO
myproxy-change-pass-phrase(1), myproxy-destroy(1), myproxy-info(1), myproxy-init(1), myproxy-logon(1), myproxy-retrieve(1), myproxy- store(1), myproxy-server.config(5), myproxy-admin-adduser(8), myproxy-admin-load-credential(8), myproxy-admin-query(8), myproxy-server(8) MyProxy 2009-12-1 myproxy-admin-change-pass(8)
All times are GMT -4. The time now is 03:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy