07-10-2012
Thanks for the reply. But I do not want to create the ssh key.
I need to pass the password in the script itself.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Is there a way to prevent users from being able to execute commands less a select few? For instance, I wish to allow the user to be only able to execute 1 command, which is exec a.sh. He should not be able to do simple stuff such as ls, cd, rm, cat, etc.
Can this be achieved?
... (1 Reply)
Discussion started by: rockysfr
1 Replies
2. Shell Programming and Scripting
i have logged in as user.
I want to write a script to login into root and execute commands for eg. ifconfig or other command.
kindly help me out. (6 Replies)
Discussion started by: pradeepreddy
6 Replies
3. Debian
hello friends,
one user is created named "user1"
I login as "user1" . Now when i do "su -" to be root user I have to give password for root .
Is there any way through which we can skip giving the password to root.
i.e.
user1@work:~$ su -
Password: xxxxxx
work:~$
I don't want that... (1 Reply)
Discussion started by: pradeepreddy
1 Replies
4. Shell Programming and Scripting
Hello All,
I'm new to unix and i need the below favour from you.
I have list of 50 unix server. I need to login to all the server one by one and with the same user and password. I will declare the user name and password globally in the script.
for example :
servername- hyperV
user name... (4 Replies)
Discussion started by: Hari A
4 Replies
5. Shell Programming and Scripting
Requirement:
Run a shell script with below inputs
file name
checksum
path
the script should go to multiple servers (around 35) and verify the input cksum and if there is a mismatch display a simple message to the user that cksum verification failed.
host details, user id /... (1 Reply)
Discussion started by: amicableperson
1 Replies
6. Shell Programming and Scripting
Hi,
I am using solaris 10 and bash shell.Script execution follows below.Initially it will check whether a directory exists or not if does not exist it will create it.(This I have completed)
Second step:I have four users say user1,user2,user3,user4.Script should prompt for the user id and... (11 Replies)
Discussion started by: muraliinfy04
11 Replies
7. Shell Programming and Scripting
Hi,
I want to collect info from a no. of servers whether there grub.conf contain "elevator" parameter or not.
What I want is
sudo cat /etc/grub.conf | grep -q "elevator=noop"; echo $?
If output is "0", I want name of that host in a file called "present"
if its not "0", I want that... (4 Replies)
Discussion started by: stunn3r
4 Replies
8. Shell Programming and Scripting
Hi,
i want to write script where it will login into 50 hosts and if login is successful it print message "login to host1 is
successful" if not it should print message "Not able to login to host1". once connection to the host is succesful it should fire df command to check filesystem if df is... (3 Replies)
Discussion started by: amru8810
3 Replies
9. Solaris
HI Community.
I was trying to create ssh password less authentication for one user called night and it's not working for me.
These are the steps I followed:-
I have logged into the server and issued ssh-ketgen -t rsabash-3.2$ ssh-keygen -t rsa
Generating public/private rsa key pair.... (4 Replies)
Discussion started by: bentech4u
4 Replies
10. Shell Programming and Scripting
Hi,
I have a requirement where in i need to write a shell script to set users password to never expire. I know the command which is used to perform the same .. which is chage command.
But, could not figure out how to do the same in shell script.
Could you please help me with the shell... (3 Replies)
Discussion started by: suren424
3 Replies
LEARN ABOUT XFREE86
setuid
SETUID(1) General Commands Manual SETUID(1)
NAME
setuid - run a command with a different uid.
SYNOPSIS
setuid username|uid command [ args ]
DESCRIPTION
Setuid changes user id, then executes the specified command. Unlike some versions of su(1), this program doesn't ever ask for a password
when executed with effective uid=root. This program doesn't change the environment; it only changes the uid and then uses execvp() to find
the command in the path, and execute it. (If the command is a script, execvp() passes the command name to /bin/sh for processing.)
For example,
setuid some_user $SHELL
can be used to start a shell running as another user.
Setuid is useful inside scripts that are being run by a setuid-root user -- such as a script invoked with super, so that the script can
execute some commands using the uid of the original user, instead of root. This allows unsafe commands (such as editors and pagers) to be
used in a non-root mode inside a super script. For example, an operator with permission to modify a certain protected_file could use a
super command that simply does:
cp protected_file temp_file
setuid $ORIG_USER ${EDITOR:-/bin/vi} temp_file
cp temp_file protected_file
(Note: don't use this example directly. If the temp_file can somehow be replaced by another user, as might be the case if it's kept in a
temporary directory, there will be a race condition in the time between editing the temporary file and copying it back to the protected
file.)
AUTHOR
Will Deich
local SETUID(1)