can someone help me for the below problem statement with the help of a script .
1. I am having couple of Linux Servers
a. I need to login and need to do a sudo
b. need to give a user id , which will take to user directory`s homedirectory . ( say homedirectory name is radha )
c. It shall take me to a command prompt kind of GUI ( which is golden gate , if anyone aware of ) , where i need give a command "info all" then it shall list all the proccess running in that .
d. then i need to give a command for DATE , which will show the date .
e. click exit , exit
2. The o/p from server1 has to come to a notepad in local system .
3. we need to repeat the step-1 again for server 2 and output has to append to notepad created for server 1
4. same has to be done for other servers
Thanks in advance .
---------- Post updated at 11:55 PM ---------- Previous update was at 11:40 PM ----------
Hi All ,
If an option possible to send email to a DL , that also helps instead of copying to desktop in notepad .
Hi,
I am planning to automate a deployment process and the below are the steps
Connect from windows to Unix server
Login with user name : admin and password
After logging in , switch user to root to get additional privileges
Perform actions on files and directories post switching to... (3 Replies)
Hello ,
I am trying to run a NetBackup command in remote server. Also this command can only be run by root so I am using sudo . Also I want the output of the command locally in a file.
The below command asked for password , ran successfully and showed Output on my local server screen
... (2 Replies)
I have to write a shell script in my current linux server and I have to connect to a different server then do sudo login and finally run some scripts residing in a particular directory and get results back. I am starting to write my shell script as below but after I do ssh login it prompts for... (2 Replies)
Hi All,
I am trying use the below su command to execute a shell script using different user.
Caould some one please help me out as to how to pass the pass the password when prompted or is there any way to execute the shell script using other user.
I have had look at the other posts in forum... (1 Reply)
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)
I logged in through ssh, but can't re-login as root.
sudo login
Arch login: root
Password:
Login incorrect
Arch login:
But I am sure my password is right. Why?
But on local tty1, this works. (2 Replies)
Hi Gurus,
I have small issue...
I used to pass the passwd for sudo commands like below,
gzcat ~/passwd.gz | sudo su - <villin> >> eof
------
-----
------
eof
And it was able to login into "villin" sudo account successfully. But now, I'm using the same in another script for the... (2 Replies)
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)
Hello All
Nice to meet you all here in this forum,
it's my 1rst time here
i'm asking about a little issue that i face
i added a ksh script that echo " please insert your name " and store the output to a login.log file.
the script is working fine with normal telnet
but Xstart is not working... (8 Replies)
Hi Everyone,
i am writing a script which will display all channels as below
sudo /usr/bin/su - mycamqrd
chs
I kept the above two lines in a ksh and after ran that it is going to mycamqrd home dir(sudo /usr/bin/su - mycamqrd).. The script is coming out and it is not executing chs. Please... (5 Replies)