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

3
votes
1answer
2k views

Linux- Permission denied?

I'm installing Neo4j server as a linux service, but when I install it, I get the following message: /sbin/insserv: Permission denied What is this? What should I do? I'm running everything with ...
3
votes
1answer
393 views

reconstructing shell session from a typescript

There is a bunch of tools like 'script', 'screen', 'ttyrec' which allow record content of shell sessions. By design these tool records everything displayed on pty, including control characters. ...
2
votes
1answer
46 views

Inspecting how $PATH gets created

Is it possible to "listen" to a variable's value during the start of a new shell? I have a script that checks for the $PATH variable in the typical places, but I'd like to try something different. ...
2
votes
1answer
643 views

Can't set TERM permanently in fish shell

I use the fish shell. I'm trying to run vim inside tmux with the solarized theme, but the colors are broken unless I run: set -lx TERM screen-256color-bce; before running tmux attach. It's ...
1
vote
1answer
61 views

Trouble installing ZSH

I did the following: yum install zsh Then chsh eduar New shell [/bin/bash]: /bin/zsh When I type: curl -L http://install.ohmyz.sh | sh I got this: You already have Oh My Zsh ...
1
vote
1answer
104 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. ...
1
vote
1answer
72 views

cp/rsync command with destination as symlink to a directory

I am working on a cPanel backup solution at the moment. We are now informed about this exploit. Exploit : Full ROOT ACCESS to server 1.) create malicious file from, normal user account: mkdir root ...
1
vote
1answer
601 views

Group permission inheritance and umask

Edit: in my case virtual_use_local_privs=TRUE did the trick. i'm trying to force newly created files and directories inside foo/ directory to be owned by nginx user and to set the right permissions ...
1
vote
1answer
170 views

The plugin of munin is always timed out

I want to use munin to make a graph of ttyACM0 in Linux, but munin can not create the graph. I found some information in "munin-node.log". it shows that "Service 'temperature' timed out". So I changed ...
1
vote
1answer
107 views

Cygwin shell is overriding my Windows shell

I'm not sure what I did, but I've somehow got Cygwin installed in such a way that even when I try to run an ordinary windows shell, Cygwin is interfering. I have batch scripts that I want to run in ...
1
vote
1answer
123 views

how to limit maxlogin for a port forward over ssh user who Do not execute a remote command

I have some users, who connect to my server through the ssh for port forwarding and ssh tunneling, but there is a problem: I cannot limit their concurrent logins, because they have no session and ...
0
votes
1answer
72 views

Shell script for docker ps -a | grep to find number of certain containers running

I want to write a script that is executed by my development build server that will remove any 'similar' docker containers before building and running a new container. Below is pseudo code for the ...
0
votes
1answer
28 views

Does whitespace matter in nginx conf files?

I have an nginx conf file that due to using environment variables, I have a shell script echo, this file I refer to as nginx.conf.template, then I place the echoed reult into the actual nginx.conf, ...
0
votes
1answer
61 views

Suhosin - Disable shell_exec default, allow from one directory

I have in php ini this function, which blocks shell_exec default. php.ini suhosin.executor.func.blacklist = shell_exec Its works well. When I want to allow shell_exec, so I use in httpd.conf ...
0
votes
1answer
316 views

How to scp file to remote servers' root directory and run sudo commands?

NOTE: The servers does not share the same password but I will setup no-password login at first. Here's the use case, I need to do these below step by step in my deploy.sh: scp files to remote ...
0
votes
1answer
30 views

Check if user is logged in VSFTPD (from the server)

I need to solve a task with a script. I moving files from a user home directory to another storage regularly (in every 5 minutes and so). How can I detect if this user is logged in (via VSFTPd ...
0
votes
1answer
15 views

Nova CLI yields zero output on stderr and stdout

following problem. I got this shell script: #!/bin/sh # Provide log for debugging if [ ! -f /home/some-user/port-control.log ]; then touch /home/some-user/port-control.log chown some-user ...
0
votes
1answer
43 views

Duplicity: No Shell Expansion with Globbing Filelist?

I am running a Samba PDC with both home directories and Win7 (roaming) profiles under '/home', i.e.: /home/[user name] /home/samba/profiles/[user name]/win.V2 For backup purposes (duplicity 0.6.18 ...
0
votes
1answer
68 views

How can I tell a script is running under cron?

Is there a standard way to know if a shell script is running under cron as opposed to running from the command line. i.e. I'm thinking of running with more verbose output when manually kicked from the ...
2
votes
0answers
146 views

Reset root shell back to /bin/bash in suse 11

In my production server which is running SUse 11 SP1, the root shell is set to /bin/eksh. Not sure how come it is set to this..we are using /bin/bash as root's default shell. I tried to reset it like ...
1
vote
0answers
46 views

Echo each shell script command with a timestamp

set -x or set -v prints every executed command. How do I get the command printed with the time when the command started executing?
1
vote
0answers
53 views

mail send format issue in different linux servers

I have created a send mail script which will run on couple of my client servers. The mail was sent correctly in couple of servers but in some servers the format we receive is not what what we ...
1
vote
0answers
67 views

Linux: What could be the reason for random fails in updating passwd.byuid by running yppasswd?

In order to allow NOC users in my company to manage users through NIS I've created the following script: #!/bin/bash # This script will simplicate NIS user management. # You will not be able to ...
1
vote
0answers
117 views

How to package shell script file with license key file

I am working on automated shell script for specific task . Before executing task steps I want to validate the license key provided to the customer with a webservice call. Please help me in making ...
1
vote
0answers
149 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
392 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
vote
0answers
192 views

EC2 - editing .bashrc causes terminal to hang and checks to fail

I've been testing this for the past few hours with no luck. When launching an Ubuntu 12.04 EC2 micro instance, I SSH to it, create a new user and continue with installing Ruby version manger under ...
1
vote
0answers
94 views

Why Parent Class In a TC Rules Tree Not Working

The parent class in my TC rules script doesn't work as it garanteed! Can somebody tell me what is wrong with my script? Here are some details about my question: From the chapter "9.5.4.4. Sample ...
1
vote
0answers
304 views

Automate an interactive command which use /dev/tty

well pretty much it's in the title. I've a interactive command. This one ask for a password through /dev/tty. I use this command within a shell script. So the command should read the information ...
1
vote
0answers
1k views

Windows GPO “Allow Remote Shell Access”, where to set 'False' once you enable it?

OS : Windows 7 64 bit Under Local Group Policy Editor > Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Windows Remote Shell > there is a policy ...
0
votes
0answers
17 views

Dangers of closing file descriptors

In the Stack Overflow question Check if a program exists from a bash script the accepted answer notes that closing stderr is dangerous: (minor side-note: some will suggest 2>&- is the same ...
0
votes
0answers
37 views

I need to convert system log file into xml or readable form

I need to convert system log file (start -> administrative tool -> event viwer) into readable form like .xml. how can i did this via command prompt.. I did this using PowerShell by this command ...
0
votes
0answers
47 views

Change ram usage in apache.conf

I´m triggering a shell command from my PHP script. As it is much slower when running from my Webserver then manually from shell, I thought the max ram per Apache Thread might be the reason. The ...
0
votes
0answers
36 views

Configure to enable login in a different shell pass through default shell in SSH

I would like to configure a SSH server in Linux that be enable to login a user in two different shells: one by default and one alternative. I have tried configuring SSH subsystem. I can configure ...
0
votes
0answers
25 views

ForceCommand vs Subsystem

Is there any particula reason why I should use ForceCommand internal-sftp instead of Subsystem sftp iternal-sftp and disabling the shell?
0
votes
0answers
38 views

Init script only offers help suggestion

I modified the uwsgi init.d script for debian from the apt-get package download. This is the script I have below: #!/bin/sh ### BEGIN INIT INFO # Provides: uwsgi # Required-Start: ...
0
votes
0answers
22 views

How to escape pipeline char in Windows shell?

I need to specify a regular expression that includes | character to findstr command: processtext.exe | findstr /R "Hello|Bye" How do I escape it? \| does not work. Quotes fix issue with pipelining ...
0
votes
0answers
27 views

Is it possible to break out of a “trap 1 2 3” secured terminal session by using SIGSEGV?

The title says it mostly. I'm auditing the security of a terminal-based application on AIX, and the way you use it is to connect to it remotely through telnet, where the ".profile" of the telnet user ...
0
votes
0answers
80 views

CentOS - how to chroot sftp and have mysql as shell

I have a user who I would like to have sftp access to one folder only (chrooted). Also he logs in with ssh, I would like him to only have access to mysql. I am able to chroot the users sftp (by ...
0
votes
0answers
164 views

ftp ERROR: PERMISSION DENIED with files downloaded with wget

i have a little issues with wget and ftp. after i download a folder from internet with wget to my home folder in centos server. wget -r --no-parent --reject "index.html*" http://www.example.com/xxx/ ...
0
votes
0answers
32 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 ...
0
votes
0answers
144 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
67 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
0answers
49 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
116 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 ...
0
votes
0answers
43 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
0answers
3k views

rsync: getcwd(): No such file or directory (2)

I want to sync Server1 and Server2's logs to LogServer. For Server1: rsync -avz -e 'ssh -p 2188' user@server1:/usr/local/servers/logs/* /usr/local/logs/ This one works, but for Server2: rsync ...
0
votes
0answers
26 views

Running command from script won't give desired output

If I run sudo /usr/lib/update-notifier/apt-check -p &> ~/update-list.txt directly on terminal, I get the update-list.txt file with all the updates in it. But if I write the same command in a ...
0
votes
0answers
281 views

shell command queuing system linux (like atd)

I need to queue shell commands depending on current available resources. I know of atd and it's exactly the type of tool I would like to find but with consideration for RAM and possibly disk ...
-2
votes
0answers
20 views

iptables shell command from php, does not apply fully?

I run a shell script from php. shell_exec("/abs_path_to/lorem.sh"); When I run the script in Terminal # sh "/abs_path_to/lorem.sh", it works. The script consists in iptables rules. I checked it is ...