A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion. Not only does it allows the user to run programs from a text interface, but frequently offers basic ...

learn more… | top users | synonyms

0
votes
0answers
7 views

Is there a way using the shell to install certificates and enable encryption in 389 directory server?

My client has a 389 directory server installation that I discovered does not have SSL enabled on it. I would like to do this but I've always had to do it using the Admin console. At some point they ...
1
vote
1answer
32 views

ShellShock test shows wget and curl access

I've fixed shellshock bug on my Debian 6 server and while testing on http://shellshock.brandonpotter.com/ I get "No Vulnerabilities Found" and that's OK but they also check other things and in the ...
0
votes
0answers
17 views

execute local command using ProxyCommand ssh

I am trying to execute local command using ssh and ProxyCommand in sys config but getting an error cat ssh_config Host ameyj-c Hostname x ProxyCommand bash -s "/home/abc/abc.sh" ssh ameyj-c ...
0
votes
0answers
7 views

How do I automate this in a shell script? [migrated]

I'm using the application PlexConnect on my home server (a headless OSX box) and I have to ssh in (from an iMac) and manually kill the Python process sometimes with the following: ssh 192.168.0.7 ...
1
vote
1answer
40 views

SFTP for users (own site folder)

I'm trying to config SFTP, so that my users can access their own site folder (with PSFTP/FileZilla). I use Vagrant, CentOS7, NGINX and .sh file. This is my bootstrap.sh, for creating one of my users. ...
0
votes
0answers
3 views

Why does “$ sudo echo 'yo' ” works? [migrated]

I understand that sudo cd /directory will return: sudo: cd: command not found because cd is a shell builtin and not a binary. But then, why does sudo echo 'this is a test' works fine? What ...
0
votes
0answers
12 views

Check if Cacti Boost is currently running

How can I find out whether the boost update process is running presently on Cacti? I want to check in a script before I start the regular system backup, delay my backup if it's boost is still running ...
0
votes
2answers
27 views

ssh-keyscan stderr comment on success

I am running a shell script to add fingerprints to known_hosts. Code is like this: status=$(ssh-keyscan -T 5 $remotehost >> ~/.ssh/known_hosts 2>&1) if [[ $? != 0 ]]; then echo -n ...
1
vote
2answers
89 views

Python Script portion failing to execute within init.d/ on RedHat 6.5, why?

I've created a init.d script called rmCluster which is supposed to execute a simple python script at shutdown which uses boto to shutdown a particular cluster of servers, with 755 perms, located in ...
0
votes
0answers
29 views

Shell script permission denied despite +x flag [migrated]

This is an odd one, it only happens on one server (shared hosting, so I have limited access to configuration and logs), but I can't wrap my head around it. I have a shell script which runs some app's ...
1
vote
1answer
24 views

Losing carriage returns in variable assignment

If I assign a variable in Bash like so: PRIVATE_KEY="$(< ~/.ssh/id_rsa)" and then immediately dump that to a file: echo $PRIVATE_KEY > tmp.txt and then compare this to the original: diff ...
1
vote
2answers
82 views

Locked out after installing a bash without executable bit

After scp-ing a shellshock-patched bash binary to an openSUSE 12.2 Linux VM and replacing the login shell with it, no user can log in via ssh or the console. As it turned out, the executable bit got ...
1
vote
1answer
298 views

Shellshock protection in Rackspace Ubuntu

I am trying to update my Ubuntu 13.10 servers in Rackspace to avoid Shellshock bug, but it is not working. Here is what I am doing: $ sudo apt-get update && sudo apt-get install ...
0
votes
1answer
39 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. ...
0
votes
0answers
19 views

Jenkins shell not running /bin/ps

I have a Jenkins job that is running NPM to start a Node server, and I want to capture the process ID of node in a file (which I archive) so that I can stop the exact same process later on. Killing ...
1
vote
0answers
61 views

Encrypting/Decrypting a file using openssl through an autorun script

So I am trying to encrypt/decrypt a file using openssl. I am running it through a script that is automatically run when I mount a USB, and decrypts the file. However, it doesn't work quite right, so ...
0
votes
1answer
55 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
0answers
29 views

Bash and background processes PGID and receiving signals

My actual problem is that a process I run in an rcfile in docker as docker run container bash --rcfile rcfile remains attached to the bash session by sharing the PGID which means that when I Ctrl-C an ...
1
vote
0answers
35 views

Increase character width in Ubuntu server shell? [migrated]

Is there any way to increase the character width from 80 to something higher in the shell in an Ubuntu server?
0
votes
0answers
35 views

How can I sudo su and change directory just after? [migrated]

I would like to create an alias that does something like this: alias userYYY='sudo su userYYY; cd /a/path/that/only/userYYY/has/access' So then from my command line, I am logged in with a sudoer ...
0
votes
1answer
18 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
0answers
24 views

Netstat count TIME_WAIT connections by port

I can obtain individual TIME_WAIT counts on a port, netstat -nat | grep :11300 | grep TIME_WAIT | wc -l; but how to do this based on all ports eg: 11300 2900 connection 3306 1200 connection ...
0
votes
2answers
48 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, ...
0
votes
0answers
33 views

ProFtpd with ssl and jailed users that cannot login to bash

I've followed several instruction pages and tutorials about configuring ProFtpd on Ubuntu (12.04) and they all give me "one thing works while other don't" solutions. Goal is to utilize SFTP protocol ...
0
votes
0answers
28 views

Elevated privileges for non-modifiable install script

I need to give permission to a local user to run an installation script that requires root privilege. So I created a special group in which this user is a member of and gave the permissions to the ...
0
votes
0answers
26 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
votes
1answer
63 views

Login by ssh , change the remote PS1 and don't quit the remote ssh shell [closed]

I want to change PS1 when i ssh another centos strshell = 'PS1="remote!"' os.system("ssh -i %s -l%s -p%s %s %s"%(SSH_KEY,SSH_USER,SSH_PORT,des,strshell)) ssh quit automatically. I want to ...
0
votes
2answers
31 views

How do I capture the Maven Jar name as a part of a Hudson job?

I have a Maven 3 job configured in my Hudson server. When the Hudson server successfully builds the Maven jar, I have the jar being deployed to an SCP repository on another server. I want to execute ...
-2
votes
1answer
63 views

Crontab not working to send email [closed]

I have CentOs 6.5 running on a VPS Host. I installed crontab and email using the below commands yum install vixie-cron service start crond chkconfig crond --levels 235 on yum install sendmail ...
1
vote
0answers
108 views

SSH without invoking shell

I've managed to mess up some shared libraries on my system, and now my shell cannot be run, thus locking me out of the system. Both ssh, sftp, and scp, as configured on the remote system, seem to rely ...
-1
votes
1answer
74 views

How to access a system with write permission after file system check fails?

I created three new partitions, but after a reboot, the system is being dropped to a shell: /dev/mapper/group-newpartition: clean, 11/655360 files, 276620/2621440 blocks [FAILED] An error occurred ...
-2
votes
1answer
24 views

zsh substitution, can't do regex with repetition

I'm trying to perform ZSH variable substitution, but I'm having to do it the lame way, by piping through cut. Is it possible to perform this operation entirely within ZSH? ...
0
votes
1answer
90 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 ...
0
votes
1answer
42 views

chattr: undefined symbol: set_com_err_gettext

I've moved my CentOS 6.5 installation to a new server and I'm unable to use chattr on my new server: chattr: symbol lookup error: chattr: undefined symbol: set_com_err_gettext How to resolve this ? ...
0
votes
2answers
410 views

Can't run AWS CLI from CRON (credentials)

Trying to run a simple AWS CLI backup script. It loops through lines in an include file, backs those paths up to S3, and dumps output to a log file. When I run this command directly, it runs without ...
0
votes
1answer
101 views

How to prevent syslog message popping in a ssh session without affect other sessions?

i have a machine(RHEL 5.2) which receives syslog message from remote machines. And now it keeps popping message from remote machine in a ssh shell, which is annoying when i want to do something on it. ...
0
votes
0answers
61 views

Distributing Master node ssh key

For the master node to passwordless-ly ssh into the slaves, the master needs to distribute its ssh key to the slaves. Copying key using ssh-copy-id asks for the user password. If there are hundreds of ...
2
votes
3answers
81 views

Can I use Bash interpreter in service/daemon scripts?

I'm writing a Debian/Ubuntu service that should start on at runlevel 2-5. Most of the existing services I came accross are written using /bin/sh (Shell) interpreter while /bin/bash (Bash) offer lot ...
2
votes
3answers
87 views

Common login script

Few weeks ago I thought it would be a good idea to write a script which should send me an email whenever some user would log in into my server. So I came to a perfectly working script ...
0
votes
7answers
196 views

better way to loop through a list of servers

I regularly do things where I loop through a list of servers to take some action. For example: for s in `cat servers.txt` ; do echo; echo $s ssh $s 'do something' done I'm wondering (from a ...
0
votes
1answer
81 views

Shell script won't run ruby script file

My shell script (my_shell.sh) won't run the ruby script ("ruby_script_1.rb) in it. my_shell.sh #!/bin/sh # Invoke the ruby script here ./ruby_script_1.rb It could not find where the ...
0
votes
1answer
55 views

Bash function hangs while command run perfectly without function

Following function hangs : ssh() { local RESULTS; RESULTS=$(ssh $USERNAME@$SERVER $SSH_COMMAND1); echo $RESULTS; } ssh; while if i run following commands they work fine : ...
0
votes
2answers
75 views

Access local console via SSH

I am searching for a way to interact with a local console via SSH - just as you would do with an directly connected keyboard. In my particular case I got a debian server (console only, no X system) ...
0
votes
0answers
20 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
1answer
45 views

prevent normal users from running code on a cluster outside of pbs system

In our cluster with PBS batch system (torque) installed, we wish all the users execute their jobs by qsub so that the CPU resources can be well managed. However, it is found that users in our cluster ...
1
vote
3answers
89 views

How to log multiline message with logger command?

I want to log a multiline message into the system logger via the commabnd echo -e "foo\nbar" | logger But it appear as 2 logs. Is it possible to log as a single log?
3
votes
5answers
237 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 ...
2
votes
2answers
70 views

How to keep script from swallowing all of stdin?

I have a script that reads from a pipe in a loop and runs an expect script and a normal shell script in the loop. Both scripts run ssh to another server to grab a piece of data. For example: cat ...
0
votes
2answers
49 views

Delete oldest directory, skipping two of them

I have to delete oldest directory. But, two of directories does not have to be "included" in this action. So, directory content looks like this: [root@myserver backup]# ls -la total 84 drwxr-xr-x 21 ...
2
votes
2answers
330 views

Linux locale: en_US.UTF-8 vs en_US

I usually config my ubuntu via sudo locale-gen --purge en_US.UTF-8 And I've the installed locales # locale -a C C.UTF-8 en_US.utf8 POSIX Is it okay since I am missing en_US?