0
votes
0answers
69 views

How to fix Shellshock vulnerability on Debian Squeeze? [duplicate]

How do you fix the shellshock bash vulnerability on Debian Squeeze? (I originally posted just the answer but that got modded, go figure), so now I'll post the answer below...
0
votes
1answer
63 views

CentOS 7: Getting interface IP numbers

I am trying to autopopulate the /etc/issue in a CentOS 7 image (this will be a template, and it needs to be easy to identify the resultant VMs at a glance). I have the following in my ...
0
votes
0answers
27 views

Cron bash script skips second do/done set

I have a script that checks IPs for ping reply then tries to run an snmpwalk on them. I am trying to schedule the script to run weekly in cron. When I run the script in the shell, it runs perfectly. ...
1
vote
2answers
375 views

Centos failing to upgrade bash

I'm trying to resolve the recent Shellshock exploit however every time I run "yum update" or "yum update bash", it plainly says everything is up to date. I'm pretty frustrated at the issue and ...
0
votes
2answers
353 views

How to patch for CVE-2014-6271 & CVE-2014-7169?

CVE-2014-6271 & CVE-2014-7169 is a bash related bug that reported at 24-Sep-2014. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271 ...
1
vote
0answers
17 views

yum-complete-transaction in a crazy loop

I was trying to update a server that I have with yum update and it aborted because the server ran out of memory. I killed off a few processes that were not needed and ran yum-complete-transaction but ...
8
votes
4answers
6k views

Can not update bash on Debian Squeeze

Can not update bash on a Debian Squeeze server to get rid of discovered vulnerability: bash --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) apt-get update apt-get install bash ...
0
votes
1answer
12 views

Permanent header in bash terminal [closed]

I'm working on a small server I want to put together (nothing big, an Android HDMI dongle, running Debian armhf, no desktop, just remote), and I want a small little feature I've seen at a few places ...
0
votes
2answers
31 views

Linux `file` command display encoding

The file command returns me the encoding of a file + the EOL if it's not LF. But it returns ASCII for both ANSI and UTF-8 without BOM. On UTF-8 files it returns UTF-8 Unicode (with BOM). An I doing ...
0
votes
1answer
15 views

insserv: warning: script 'uwsgi' missing LSB tags and overrides

This is my code: #!/bin/bash daemon="$APPVENV/bin/uwsgi" args="--emperor $APPCONF/uwsgi/app.ini" pid="$APPDIR/emperor.pid" case "\$1" in start) echo "Starting uwsgi" ...
0
votes
2answers
30 views

how to run the dialog command with proccess

Please look on my code – ( bash script ) I want to display both dialogs on the screen on the same time, one dialog display the: tail –f from - /var/log/proccess1.log , and the second dialog ...
1
vote
2answers
82 views

Which open source program is similar to the Linux “dialog” command? [on hold]

The linux dialog command is a great tool for creating dialog boxes in terminal windows (e.g. in a bash script). However, there is a drawback of dialog which is that the window is always positioned in ...
3
votes
1answer
46 views

How to view two dialog boxes on the linux console, running on the same time?

I want to view on the Linux console two dialog windows on the same time. I want a window that views the progress BAR, and the a second tailbox that view the logs are running. The problem is that the ...
0
votes
1answer
15 views

Trouble using ssh-key gen specifying location and password

This is my code: ssh-keygen -t rsa -C "$APP" This works perfectly. However it then asks me to specify location and password. I was hoping I can automate this all in one go, however this command ...
0
votes
2answers
43 views

Generating random passwords with shell on server deployment

I'm trying to generate random and secure passwords to my various configuration files and settings on the fly when I run my automated deployment script. I want them to be generated, shown to the user, ...
-1
votes
1answer
32 views

how can i redirect run program command on different server [closed]

I have 2 server Linux server (RHEL5). Server1 is running X server where users connect to it with VNC/NX and the other one is for running programs. So users don't interrupt to each other, I want to ...
0
votes
1answer
53 views

Background job terminates when run from script, but works fine when run from bash prompt

I'm on MacOS 10.9.4. I want to put sftp to background to automatically push some files to it through named pipe later, as suggested here. It works fine when I enter commands manually from bash prompt ...
0
votes
4answers
53 views

Redirect HTTPS traffic without changing the HOSTS file

I have a website hosted on 2 servers. The website is SSL based. I'd like to monitor (load the main page and look for a certain string) the website per server using a local Opsview. Meaning I need to ...
0
votes
1answer
35 views

Bash time check script allow 1 minute difference

I am developing a nagios/collectd check for time checking on each server. I have done bash script to get info from Collectd WSP files and check them against the nagios server time (date +%s). Collectd ...
-5
votes
0answers
34 views

parse httpd log in bash [migrated]

my httpd log has the following format 123.251.0.000 - - [05/Sep/2014:18:19:24 -0700] "GET /myapp/MyService?param1=value1&param2=value2&param3=value3 HTTP/1.1" 200 15138 "-" "-" I need to ...
-2
votes
2answers
64 views

Cron not launching python script

Python script is not being run, all other functions are running and stand alone script runs but combined... nada. Initially it was */30 * * * * screen python ~/db_preset.py (Yes there was new line ...
0
votes
2answers
44 views

Bash Script keeps respawning after it should die

#!/bin/bash PID=$(pidof daemon) kill $PID while ps -e | grep "[d]aemon" >> /dev/null; do sleep 30 done sh -c /root/daemon This script is set on a cronjob to kill and restart this program. It ...
0
votes
0answers
13 views

pipe rrd to a new directory

I am chrooted and running out of drive space, so I mounted back to the host drive which has plenty of space but cannot seem to pipe the outputted data to my empty drive [root@localhost rra]# ls ...
-1
votes
0answers
30 views

BASH: Create a temporary password variable that doesn't get stored in history? [duplicate]

I have a script that runs a curl request in a loop. The request needs to include my credentials using the --user option. I'd like to assign my password to a local variable $password, and then supply ...
1
vote
1answer
34 views

crontab truncates file path

I try to run the following command: crontab -u root /root/iss/current/node/bin/installers/nl_brandless_selector_full_hd/nl_brandless_selector_full_hd_cron_file But I got an error like this: ...
0
votes
0answers
25 views

different interactive and non-interactive shells

A user account has it's shell defined in passwd file as bash. I would like to change this user account's shell to tcsh for non-interactive jobs (like ssh ), but keep interactive shell to bash. Is ...
1
vote
2answers
137 views

Linux/Bash: Test if my server is opened to the Internet programmatically/via CLI [closed]

RHEL 6 and Bash. It would be easy if I had a remote server to just run nmap from, or even curl/wget, but I only have access to servers on our side of the firewall. I know I can manually check ...
0
votes
1answer
153 views

CentOS 6.5 proxy bypass/no_proxy not working

I am running CentOS 6.5 on my desktop. I've set the Network Proxy using the network proxy application provided under Preferences. I've also set the following exceptions: ...
1
vote
2answers
64 views

script to count the occurence of the particular string in the given time interval

We are trying to write a script "sendemail.sh" to count the number of occurrence of a particular string in a log file "SendEmail.log" within the given interval. We have a log file. In that we are ...
-2
votes
1answer
113 views

Bash Script to Compress / Transfer / Remove Log Files [closed]

I am currently using chronolog to set log file names for Apache with date. They are in the following format: /WEB/LOGS/APACHE_ACCESS_YYYY-MM-DD.log /WEB/LOGS/APACHE_ERROR_YYYY-MM-DD.log I would ...
15
votes
5answers
870 views

Piping wget output to /dev/null in cron

I am running the following command every 5 minutes in my crontab to keep Phusion Passenger alive. */5 * * * * wget mysite.com > /dev/null 2>&1 When I run this it performs a wget on the ...
3
votes
1answer
32 views

In tar how can I exclude dir contents but leave empty dir

I want to create a tar file excluding certains folders who have many sub-folders and files, but leaving only the main folders that's being excluded. Explaining: -project |-dir1 |-dir2 |-cache ...
-5
votes
2answers
51 views

Bash Script that downloads a file and checks the value if 1 or 0 [closed]

I need a Bash Script for Debian which downloads a file, that file containts 1 or 0, 1 when the services is running, 0 when not. So how can I check if the file contains 1 or 0?
0
votes
1answer
72 views

Where is this bash shell alias being configured?

While logged in as root onto a CentOS 6.5 system, I run ># alias alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' alias ls='ls --color=auto' alias mv='mv -i' alias ...
-1
votes
1answer
84 views

Delete all files except the newest of each day

I have dump directory that is filled at the rate of one file per 4 hours. I wish to keep all files for a week then delete all except the newest of each day. Bash is preferred though other solution ...
0
votes
1answer
40 views

Modify the command line that gets saved to history / .bash_history in Linux

When commands are saved to history in Linux, is there some way to prepend the command line in the history with the remote SSH IP address and process ID so that it's easy to group commands from the ...
1
vote
2answers
58 views

I need to augment my output to include cat-ing a file in this Bash script

I have a script querying a remote server based on user input and looks for the last modified date of a file. It works, however, contained in the file is a string that I need to have displayed as well ...
1
vote
2answers
205 views

Systemd exits from bash scripts that execute commands that result in failure, instead of continuing

I'm trying to get a script that pushes up my system log on CoreOS to logentries. To compensate for the fact that instances don't have internet connectivity right away when being spun up on AWS I've ...
3
votes
8answers
134 views

list linux partition names only in bash

df on linux lists the following stats on partitions. -bash-4.1# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 1918217320 1473337340 347440136 81% / ...
2
votes
2answers
101 views

/bin/sh: difference between variable and direct command

Imagine i have following bash script: #/bin/sh #next line will work correctly, outputting user name and current directory start-stop-daemon --start --exec /bin/su -- root -c 'whoami; ls' ...
0
votes
1answer
48 views

Binding timestamp value to a variable in crontab

I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far. php = ...
0
votes
0answers
32 views

Odd behaviour with varnishlog and stream redirecting

I wrote a helper to debug varnish installation and have used it on both production and development server. The odd thing is, I encountered different behaviour even though the setup is nearly identical ...
-4
votes
2answers
49 views

Linux User generation script [closed]

Was wondering if someone could point me in the right direction. I'm wanting to create a simple bash script to create user account. The script will need to prompt the admin for a username and ...
0
votes
0answers
17 views

Ctrl-C is ignored by pppd when put in a shell script

I'm trying to connect to GPRS network through a serial port connected GSM modem. When I call /usr/sbin/pppd call <peer_name> from the command line, It correctly receives and handles Ctrl+C from ...
0
votes
2answers
129 views

How to use the new ifdown and ifup?

I would like to change the MAC address on a Fedora 2o webserver, but it seams that ifdown and ifup doesn't work like they used too before systemd were introduced. This is what I would like to do ...
0
votes
3answers
105 views

Tail a file from ssh and mirror to a local file

To tail a file over ssh, I can use ssh -t remotebox "tail -f /var/log/remote.log" However, it is possible to sync the tail with a local file? So a file automatically mirror the update of the tail ...
2
votes
2answers
78 views

Two databases synced backup

I got a system that need two databases to work. I need a script to backup both databases at given point of time. I need databases to be in sync, so I need to be sure that backup does not allow changes ...
3
votes
5answers
223 views

Hide the output of a shell command only on success?

Hiding the output of a shell command usually involves redirecting stderr and stdout. Is there any builtin facility or command which by default hides the output but on error dumps all the accumulated ...
4
votes
3answers
280 views

Understanding the different directory sizes

When comparing root@debian:~# du -s /backup/test1/ 5605364 /backup/test1/ two directories with du, root@debian:/etc/init.d# du -s /data/test1/ 5605360 /data/test1/ du tells me that there is a ...
1
vote
1answer
1k views

Fork a process inside a bash shell script

I've a simple shell script like #!/bin/bash sh -c "sleep 60" & exec sleep 120 In using the pstree command, I found something like `-sleep(11681)---sleep(11682) The first sleep is due to the ...