I have an issue with all of my AIX servers where a user can execute a remote command (bash in this case) using PuTTY and bypass all of the application security that we setup in the users .profile. How do I secure this without breaking the rest of the users? (8 Replies)
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
I am currently try to write a simple script with the following condition, but so far not having luck as the exit code would always be 0.
Run remote command to read a file and grep for test word.
if test word is in the file, send email.
if not, do nothing
also possible to ssh to multiple... (3 Replies)
I have below command to check for error logs from last 24 hours from the file : /var/log/messages/ The command is working fine on the local host.
sudo awk -F - -vDT="$(date --date="24 hours ago" "+%b %_d %H:%M:%S")" ' DT < $1' /var/log/messages | egrep -i "error|fail"
I want to run the... (8 Replies)
Hi
I am trying to write a script which when I run from server A it execute few command on another server say B and show me the output.
below is the script but it is not showing me the o/p of B machine but instead showing me A machine o/p every time.
#!/bin/bash
for i in `cat... (14 Replies)
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
hi,
I need script to perform below task.
1. Read the IP address
2. copy the script from origin server to destination.
3. get root access on destination server
4. run the script on destination server
5. return to the origin server
Code:
#!/bin/bash
echo "Enter Server IP... (5 Replies)
I have two redhat linux server. i have created one script which contain some command that run on Local server as well as remote server.I am using this command to connect to remote server
ssh user1@192.x.x.x 'command'
but when i am running the script in local server it connecting to the server... (1 Reply)
Unix Box: IBM AIX
Shell : K-Shell
When i logged into a remote server through FTP, and tried to find only required month file by typing `ls -ltr *200805`, the output is "ls remotefile localfile". I coudnt understand this.
What is want is get into the remote server and get the count of required... (6 Replies)
I have the command
cat - << _EOF | ed /home/fred/test >/dev/null 2>&1
2 s#u_pwd=*:#u_pwd=${Password}:#
3,$ s/u_succhg#*:/u_succhg#${Date}:/
w
q
_EOF
I works great on the local system but I need to ssh to a remote system and run this command without... (1 Reply)