Sponsored Content
Operating Systems Linux Red Hat setup sudo for cmd exec w/o password Post 302527314 by ciupinet on Friday 3rd of June 2011 04:37:00 AM
Old 06-03-2011
You shouldn't use "-i" as parameter to sudo, because this flag instructs sudo to run the command as a login shell like this:
Code:
/bin/bash -c /bin/kill 1234

instead of
Code:
/bin/kill 1234

and you only gave sudo permissions to /bin/kill, not to /bin/bash.

So you should run your sudo command as follows, without the "-i":
Code:
sudo -u user2 /bin/kill -15 1234

Let us know how it works for you.
 

10 More Discussions You Might Find Interesting

1. AIX

Sudo ask for password

Hello I have a partition with Aix 5.3 and I install sudo I put the commands that I want to use x user and I put the option that donkask for password. But when I run with this user and I try to run that commands. ask me for a password. I put this line for no ask for password with that... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

2. AIX

sudo setup

I am working on setting sudo on a few AIX servers and wanted to know how to give users root access without allowing them access to the sudo logs, sudoers files and the /etc/security directory. (3 Replies)
Discussion started by: daveisme
3 Replies

3. Shell Programming and Scripting

password getting displayed using sudo

Hi While doing the following command password is gettin dispalyed : ssh <host> "sudo command ; exit" .... while i type my password for 2nd its gettin displayed ... i tried stty -echo and stty echo ... still i am havin problem..:confused: (1 Reply)
Discussion started by: ningy
1 Replies

4. UNIX for Advanced & Expert Users

Setup SUDO For a User on Linux Server

Hello! Can anyone please assist: Question: On Linux Server I have created two users John and Matt. I want to give both the users the ability to run 'more' and 'tail -f' commands on the log file in the directory /var/log/test.log. I do not want to give them SU rights. Can any one please... (6 Replies)
Discussion started by: sureshcisco
6 Replies

5. Shell Programming and Scripting

-exec cmd in ksh script

Hi, I discovered the following single-line script works very well to cp a large number of files from a source directory to a destination directory while avoiding the "argument list too large" error: # cpmany - copy large number of files # Takes two parameters - source dir, destination dir... (14 Replies)
Discussion started by: Tanuka
14 Replies

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

7. UNIX for Dummies Questions & Answers

How to hide password when using echo cmd?

Hi Am using unix Aix Ksh I need to hide the password using echo cmd Connecting the database and fetching ip_address and password from one table. greping the IP_address and password using two variable IP_addr Pawd Then Used echo cmd echo " connecting to $IP-addr and $Pawd" ... (3 Replies)
Discussion started by: Venkatesh1
3 Replies

8. Shell Programming and Scripting

How to setup a password less ftp??

hi, i want to setup a password less FTP to a remote server so that i can ftp to a remote server without the password. i have setup a passwordless ssh and i am able to use scp commands to connect to the remote server without asking for the password. but when i try to ftp to the same remote... (6 Replies)
Discussion started by: Little
6 Replies

9. AIX

UNIX cmd to check for non expiry type password

Hi, Here's the version of unix that we are working on. > uname -a AIX yyyyyyyy 1 6 00F613E24C00 @:on(cluster303)/iishomea/kmani00-> i have application id: aaabbb Now i need to check whether the password for the application id set to non expiry type or not. Moreover, with that unix... (3 Replies)
Discussion started by: kmanivan82
3 Replies

10. Red Hat

SSH password less setup asking for password

Hello Experts, when I am trying to connect my target server through sftp after creating ssh password less setup, it is asking for passowrd to connect. to setup this I followed below process: -->generated keys by executing the command "ssh-keygen -t rsa" -->this created my .ssh directory... (9 Replies)
Discussion started by: Devipriya Ch
9 Replies
SSS_SEED(8)							 SSSD Manual pages						       SSS_SEED(8)

NAME
sss_seed - seed the SSSD cache with a user SYNOPSIS
sss_seed [options] -D DOMAIN -n USER DESCRIPTION
sss_seed seeds the SSSD cache with a user entry and temporary password. If a user entry is already present in the SSSD cache then the entry is updated with the temporary password. OPTIONS
-D,--domain DOMAIN Provide the name of the domain in which the user is a member of. The domain is also used to retrieve user information. The domain must be configured in sssd.conf. The DOMAIN option must be provided. Information retrieved from the domain overrides what is provided in the options. -n,--username USER The username of the entry to be created or modified in the cache. The USER option must be provided. -u,--uid UID Set the UID of the user to UID. -g,--gid GID Set the GID of the user to GID. -c,--gecos COMMENT Any text string describing the user. Often used as the field for the user's full name. -h,--home HOME_DIR Set the home directory of the user to HOME_DIR. -s,--shell SHELL Set the login shell of the user to SHELL. -i,--interactive Interactive mode for entering user information. This option will only prompt for information not provided in the options or retrieved from the domain. -p,--password-file PASS_FILE Specify file to read user's password from. (if not specified password is prompted for) -?,--help Display help message and exit. NOTES
The length of the password (or the size of file specified with -p or --password-file option) must be less than or equal to PASS_MAX bytes (64 bytes on systems with no globally-defined PASS_MAX value). SEE ALSO
sssd(8), sssd.conf(5), sssd-ldap(5), sssd-krb5(5), sssd-simple(5), sssd-ipa(5), sssd-ad(5), sssd-sudo(5),sss_cache(8), sss_debuglevel(8), sss_groupadd(8), sss_groupdel(8), sss_groupshow(8), sss_groupmod(8), sss_useradd(8), sss_userdel(8), sss_usermod(8), sss_obfuscate(8), sss_seed(8), sssd_krb5_locator_plugin(8), sss_ssh_authorizedkeys(8), sss_ssh_knownhostsproxy(8),pam_sss(8). AUTHORS
The SSSD upstream - http://fedorahosted.org/sssd SSSD
06/17/2014 SSS_SEED(8)
All times are GMT -4. The time now is 09:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy