2
votes
3answers
68 views

How do i change the global login shell on a unix system?

I want to set the login shell (the shell they get when they log in) of all existing and future users. The correct way to change the login shell seems to be chsh. But this only allows me to change the ...
0
votes
2answers
36 views

Creating an environment variable for a specific user

When you set an environment variable in linux is it set only for the user who executes it, or can you specify a user when you store it, or instead is it always available for all users?
0
votes
1answer
52 views

Starting supervisor with init fails

I installed supervisor using pip on my debian 7 installation. I then grabbed this file and moved it here: /etc/init.d/supervisord https://github.com/Supervisor/initscripts/blob/master/debian-norrgard ...
0
votes
1answer
28 views

Connecting to server with remotely generated SSH key

I run a process on my server where I generate a public and private key. The public key I use for github. I was wondering, if I do a readout of the private key of the remote system, can I then save ...
0
votes
1answer
38 views

Trouble with $PATH on debian

I think I have a problem with $PATH. I am running a shell script and it is complaining that it doesnt recognize the command even though when I run it manually it does. Shell Script: #!/bin/bash # ...
0
votes
1answer
428 views

Insserv rejected the script header

I was trying to make an init script for my debian install for supervisor. insserv: Service \$remote_fs has to be enabled to start service supervisor insserv: Service ...
-1
votes
2answers
72 views

Setting IPtables rules into a file

Currently I have a debian install with a shell script which has the following content (as an example): # Setup iptables IPT="/sbin/iptables" # Flush old rules, old custom tables $IPT --flush $IPT ...
0
votes
1answer
130 views

Installing PIP on debain - Unknown command pip

I'm having a bit of a hard time installing PIP on a debian linux machine. This is the code I am using in a shell script: # Install setuptools python -c 'import setuptools' > /dev/null 2>&1 ...
2
votes
2answers
359 views

Is there a shell to change password when connecting over SSH?

This is a pretty odd question, but I'd like my users to be able to change their passwords for my FTPS server, which is using local accounts. Currently all these users have /bin/false set as shell, but ...
2
votes
2answers
2k views

ssh root access denied after changing shell

after i tried to change my server shell, i cannot login as root anymore. First, i installed the z-shell (zsh) as root and then i wanted to change it to my default shell. Therefore i used "chsh". My ...
0
votes
2answers
132 views

Debian shell script to update server software

A lot of my server software is installed via apt-get and I was wondering if there is a small shell script I can get which will will update all of this software. Also do I need to restart my server ...
0
votes
1answer
344 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 ...
4
votes
2answers
1k views

Disabling the shell of user “daemon” (/bin/false)

on a Linux system there are lot's of users by default: daemon, bin, sys, games, etc. According to my /etc/passwd most of these users have a shell assigned (/bin/sh) which seems some kind of insecure ...
0
votes
1answer
694 views

Where did start-stop-daemon store the pid file by default?

When I have a upstart script like.. exec start-stop-daemon --exec /tmp/test.sh --background --start I suppose will save the pid file somewhere and later use it for stop or restart, right? So ...
0
votes
0answers
1k views

Jenkins shell command isn't executing

In Jenkins project I add command for executiong rm /var/www/ru.liveyurist.ru/tmp/* But when I build project I get error: Started by user anonymous Building in workspace /var/www/ru.myproject.ru ...
1
vote
1answer
175 views

sudo process in process list

I've a different behaviour for the same command on 2 different machines: Server 1: sudo /bin/ps -AF | grep sudo root 19370 14291 0 1809 828 3 11:12 pts/1 00:00:00 grep sudo Server 2: sudo ps ...
2
votes
1answer
176 views

running command with sudo gives different result

I'm connected with root via ssh on a debian squeeze server. If I execute the command: /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -a '/usr/local/freeswitch/bin/freeswitch' I get the result: ...
0
votes
1answer
133 views

Debian terminal caching executable paths?

It appears that Debian 6.0.2.1 terminal caches path of executables, which is avoiding fresh executables to be run on the same terminal. I would like to know if this is a feature and if so, how to ...
-1
votes
1answer
418 views

Debian: setup aliases in /etc/profile

I need to run a script in /etc/profile to setup aliases for all users login thru SSH. But this doesn't work: setup_aliases.sh #!/bin/bash alias d='sh /opt/d/d.sh' alias dc='d c' alias de='d e' ...
3
votes
2answers
2k views

Hang while starting several daemons [solved]

I’m running a Debian Squeeze AMD64 server. Target runlevel after boot is runlevel 2, which includes rsyslogd, cron, sshd and some other stuff, but not dovecot, postfix, apache2, etc. The system fails ...
2
votes
3answers
4k views

run shell command as other user called by PHP

I have a PHP script which is called by HTTP and not as command line script. This script should call a shell command as an other user than the current webserver user www-data. Example: <?php echo ...
1
vote
2answers
770 views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
2
votes
4answers
3k views

Logging to a file, prepending a timestamp to each line (Debian)

I am trying to log output from some shell scripts of mine to a file, and I want the timestamp prepended to each line. From what I understood, that's what logger(1) is for, but I don't want the output ...
0
votes
3answers
594 views

Restricting SSH shell access to Debian server

Still new to the whole Debian thing so bear with me. The only thing I want a user logged in via SSH. No files or directories (like /etc, /var) should be visible at that point. The only thing the ...
12
votes
6answers
34k views

Run a shell script as a different user

What's a good way of running a shell script as a different user. I'm using Debian etch, and I know which user I want to impersonate. If I was doing it manually, I would do: su postgres ...