Most Popular
1500 questions
123
votes
8 answers
How can I implement ansible with per-host passwords, securely?
I would like to use ansible to manage a group of existing servers. I have created an ansible_hosts file, and tested successfully (with the -K option) with commands that only target a single host
ansible -i ansible_hosts host1 --sudo -K # + commands…
supervacuo
- 1,433
- 2
- 11
- 10
123
votes
8 answers
How to get pid of just started process
I want to start process (eg. myCommand) and get its pid (to allow to kill it later).
I tried ps and filter by name, but I can not distinguish process by names
myCommand
ps ux | awk '// {print $2}'
Because processes names are not…
rafalmag
- 1,341
123
votes
24 answers
rm on a directory with millions of files
Background: physical server, about two years old, 7200-RPM SATA drives connected to a 3Ware RAID card, ext3 FS mounted noatime and data=ordered, not under crazy load, kernel 2.6.18-92.1.22.el5, uptime 545 days. Directory doesn't contain any…
BMDan
- 7,269
123
votes
28 answers
How to copy a large number of files quickly between two servers
I need to transfer a huge amount of mp3s between two serves (Ubuntu).
By huge I mean about a million files which are on average 300K.
I tried with scp but it would have taken about a week. (about 500 KB/s)
If I transfer a single file by HTTP, I get…
nicudotro
- 1,561
122
votes
15 answers
How to show all banned IP with fail2ban?
When I run this command fail2ban-client status sshd I got this:
Status for the jail: sshd
|- Filter
| |- Currently failed: 1
| |- Total failed: 81
| `- File list: /var/log/auth.log
`- Actions
|- Currently banned: 2
|- Total…
Dark Cyber
- 1,329
122
votes
13 answers
Engineers are using explosives to remove hard rock outside our office building. What countermeasures should we take?
Our building is located approx. 100 meters from the explosive charges. They happen several times per day, and really shake the entire building a lot. This is going to go on for many days and the blasts are supposed to get stronger.
Our server rooms…
Chris Dale
- 1,553
122
votes
8 answers
How do I clear Chrome's SSL cache?
I have a HAProxy / stunnel server that handles SSL for our sites on AWS. During testing, I created a self-signed cert on this server and hit it from my desktop using Chrome to test that stunnel was working correctly.
Now I have installed the…
Foovanadil
- 1,320
- 2
- 8
- 7
122
votes
4 answers
What is the difference between unicast, anycast, broadcast and multicast traffic?
I have never had the privilege of working in an environment that required complicated routing or if it did require it, it was handled upstream of me. I've always used very simple static routing configurations and never needed to do any multipath…
user62491
122
votes
12 answers
How can I automatically change directory on ssh login?
I'm trying to get ssh to automatically change to a particular directory when I log in. I tried to get that behaviour working using the following directives in ~/.ssh/config:
Host example.net
LocalCommand "cd web"
but whenever I log in, I see the…
Gareth
- 1,446
122
votes
9 answers
How can I figure out my LDAP connection string?
We're on a corporate network thats running active directory and we'd like to test out some LDAP stuff (active directory membership provider, actually) and so far, none of us can figure out what our LDAP connection string is. Does anyone know how we…
Allen
- 1,473
121
votes
2 answers
Can I have multiple DHCP servers on one network?
This is a Canonical Question about Redundant DHCP Servers.
Is it possible to have more than one DHCP server on the same LAN? What are the implications of doing this?
What happens if there is more than one DHCP server available? How do my clients…
Rob Moir
- 31,974
121
votes
17 answers
GIT as a backup tool
On a server, install git
cd /
git init
git add .
git commit -a -m "Yes, this is server"
Then get /.git/ to point to a network drive (SAN, NFS, Samba whatever) or different disk. Use a cron job every hour/day etc. to update the changes. The .git…
user80776
121
votes
2 answers
How does try_files work?
I looked at the nginx documentation and it still confuses me utterly.
How does try_files work? Here is what the documentation says:
From NginxHttpCoreModule
try_files
syntax: try_files path1 [path2] uri
default: none
context: server,…
user274
121
votes
7 answers
REJECT vs DROP when using iptables
Is there any reason why I would want to have
iptables -A INPUT -j REJECT
instead of
iptables -A INPUT -j DROP
Mike B
- 12,016
121
votes
1 answer
What ports to open for mail server?
I have just finished setting up a Postfix mail server on a linux (ubuntu) platform. I have it sending and receiving email and it is not an open relay. It also supports secure smtp and imap.
Now this is a pretty beginner question but should I be…
radman
- 1,701