Sponsored Content
Top Forums Shell Programming and Scripting how to run the script without giving the password. Post 302359267 by ak835 on Tuesday 6th of October 2009 06:47:39 AM
Old 10-06-2009
MySQL

search on google...you'll get it... its a nice scripting mechanism to automate needs such as yours...
 

10 More Discussions You Might Find Interesting

1. Red Hat

Giving access to non root users to run application

Hi All, I have created an RPM installer and installed it via ROOT user & which works fine on Red Hat. But the problem oocurs when a non root users try to run that application (from their account), it never got executed (being it has the execute permission i.e. chmod a+x somefile.sh). I want... (6 Replies)
Discussion started by: jw_amp
6 Replies

2. UNIX for Dummies Questions & Answers

machine hangs for some time after giving password.

Hi I m trying to take a console of linux machine using putty. Whenever i connect to the machine and give password details to log into the machine it hangs for some time and then it allow the login. I m totally clueless why it is happening suddenly . ---------- Post updated at 01:14 AM... (1 Reply)
Discussion started by: pinga123
1 Replies

3. Shell Programming and Scripting

How to give password at run time in a shell script?

hi, how can i pass a password automatically when a shell script is running. i have shell script(runscript.sh) which call another shell script inside it as a different user. runscript.sh contains su - nemo -c "/bin/main_script.sh" but when i execute "runscript.sh" it try to run... (7 Replies)
Discussion started by: Little
7 Replies

4. AIX

How to write a script to run without password on a batch of servers?

I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check? Thanks (7 Replies)
Discussion started by: rainbow_bean
7 Replies

5. Shell Programming and Scripting

How to prvenent giving password run time in schell scripting?

Hi I'm copying around 20 vi files from solaris server-A to server-B using 'scp' command.I have included all 20 scp commands in one shell script. Proplem is, while executing each scp command its prompting for my NIS password of server A. Please see below How to get rid of password prompt.??? (1 Reply)
Discussion started by: buzzme
1 Replies

6. UNIX for Advanced & Expert Users

Need a exit from sftp if its ask for password and continue to run remaining part of script.

Hi I am checking status of sftp in Health check script, sftp command is used to connect the server with secure RSA key, which is successfully get connected most of the time but in some case if RSA key ask for password then I need to exit sftp command after few second and continue to run... (1 Reply)
Discussion started by: ketanraut
1 Replies

7. UNIX for Dummies Questions & Answers

To run ksh script via autosys job without asking password for file transfer

I've K shell script. It will transfer the files from one server to other server using 'SCP' command. While running the script alone as a command line in UNIX ssh terminal its running with out asking password and files are transferred with out asking for password. But by running the script using... (6 Replies)
Discussion started by: maheshbabu
6 Replies

8. Shell Programming and Scripting

How to run sftp in shell script without prompting for password?

Hi, Can anyone tell me how to pass password in a shell script for sftp so that i can run it in background without user entering the password? I used a expect script but it timesout after some time and the process remains incomplete at the end. Can anyone suggest any other idea? Will the... (3 Replies)
Discussion started by: Little
3 Replies

9. Ubuntu

Run a script at remote server without ssh password

Hello, What I want to do is to run a file on remote server by running a script at localhost but script should not ask ssh password of my remote server when script is executed. Scenario1: To copy files from server2 to data server:$ scp -r root@server2_ip:/var/www/html/*.* /var/ When I enter... (6 Replies)
Discussion started by: baris35
6 Replies

10. UNIX for Beginners Questions & Answers

Password Less Authentication not Working After Giving Full Permission

Hello Team, Please help me to solve my Problem, By mistake, I give full permission to /(root) directory. by using the following command "chmod -R 777 /" after this, the client asks for the password to login via ssh. Before that, I an able to Login without a password. Please help me to retrieve... (5 Replies)
Discussion started by: Shubham1182
5 Replies
sudo_root(8)						      System Manager's Manual						      sudo_root(8)

NAME
sudo_root - How to run administrative commands SYNOPSIS
sudo command sudo -i INTRODUCTION
By default, the password for the user "root" (the system administrator) is locked. This means you cannot login as root or use su. Instead, the installer will set up sudo to allow the user that is created during install to run all administrative commands. This means that in the terminal you can use sudo for commands that require root privileges. All programs in the menu will use a graphical sudo to prompt for a password. When sudo asks for a password, it needs your password, this means that a root password is not needed. To run a command which requires root privileges in a terminal, simply prepend sudo in front of it. To get an interactive root shell, use sudo -i. ALLOWING OTHER USERS TO RUN SUDO
By default, only the user who installed the system is permitted to run sudo. To add more administrators, i. e. users who can run sudo, you have to add these users to the group 'admin' by doing one of the following steps: * In a shell, do sudo adduser username admin * Use the graphical "Users & Groups" program in the "System settings" menu to add the new user to the admin group. BENEFITS OF USING SUDO
The benefits of leaving root disabled by default include the following: * Users do not have to remember an extra password, which they are likely to forget. * The installer is able to ask fewer questions. * It avoids the "I can do anything" interactive login by default - you will be prompted for a password before major changes can happen, which should make you think about the consequences of what you are doing. * Sudo adds a log entry of the command(s) run (in /var/log/auth.log). * Every attacker trying to brute-force their way into your box will know it has an account named root and will try that first. What they do not know is what the usernames of your other users are. * Allows easy transfer for admin rights, in a short term or long term period, by adding and removing users from the admin group, while not compromising the root account. * sudo can be set up with a much more fine-grained security policy. * On systems with more than one administrator using sudo avoids sharing a password amongst them. DOWNSIDES OF USING SUDO
Although for desktops the benefits of using sudo are great, there are possible issues which need to be noted: * Redirecting the output of commands run with sudo can be confusing at first. For instance consider sudo ls > /root/somefile will not work since it is the shell that tries to write to that file. You can use ls | sudo tee /root/somefile to get the behaviour you want. * In a lot of office environments the ONLY local user on a system is root. All other users are imported using NSS techniques such as nss-ldap. To setup a workstation, or fix it, in the case of a network failure where nss-ldap is broken, root is required. This tends to leave the system unusable. An extra local user, or an enabled root password is needed here. GOING BACK TO A TRADITIONAL ROOT ACCOUNT
This is not recommended! To enable the root account (i.e. set a password) use: sudo passwd root Afterwards, edit the sudo configuration with sudo visudo and comment out the line %admin ALL=(ALL) ALL to disable sudo access to members of the admin group. SEE ALSO
sudo(8), https://wiki.ubuntu.com/RootSudo February 8, 2006 sudo_root(8)
All times are GMT -4. The time now is 08:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy