Most Popular
1500 questions
152
votes
5 answers
What is the difference between authentication and authorization?
Basic question from a novice:
What is the difference between authentication and authorization?
Kyy
152
votes
19 answers
How to add a timestamp to bash script log?
I have a constantly running script that I output to a log file:
script.sh >> /var/log/logfile
I'd like to add a timestamp before each line that is appended to the log. Like:
Sat Sep 10 21:33:06 UTC 2011 The server has booted up. Hmmph.
Is there…
Antonius Bloch
- 4,680
- 6
- 29
- 41
152
votes
13 answers
How to set up Nginx as a caching reverse proxy?
I heard recently that Nginx has added caching to its reverse proxy feature. I looked around but couldn't find much info about it.
I want to set up Nginx as a caching reverse proxy in front of Apache/Django: to have Nginx proxy requests for some (but…
Continuation
- 3,080
- 5
- 30
- 38
152
votes
9 answers
How to remove empty/blank lines from a file in Unix (including spaces)?
How do I remove empty/blank (including spaces only) lines in a file in Unix/Linux using the command line?
contents of file.txt
Line:Text
1:
2:AAA
3:
4:BBB
5:
6:CCC
7:
8:DDD
output desired…
Michael Ellick Ang
- 2,039
- 3
- 14
- 15
151
votes
5 answers
How do I make ssh fail rather than prompt for a password if the public-key authentication fails?
I've got a script that SSHes several servers using public key authentication. One of the servers has stopped letting the script log in due to a configuration issue, which means that the script gets stuck with a "Password:" prompt, which it obviously…
rjmunro
- 2,301
- 4
- 18
- 22
151
votes
2 answers
What is Active Directory Domain Services and how does it work?
This is a Canonical Question about Active Directory Domain Services (AD DS).
What is Active Directory? What does it do and how does it work?
How is Active Directory organized: Forest, Child Domain, Tree, Site, or OU
I find myself explaining some…
MDMarra
- 100,734
- 32
- 197
- 329
151
votes
2 answers
How do VLANs work?
What are VLANs? What problems do they solve?
I'm helping a friend learn basic networking, as he's just become the sole sysadmin at a small company. I've been pointing him at various questions/answers on Serverfault relating to various networking…
Murali Suriar
- 10,296
- 8
- 41
- 62
150
votes
9 answers
Monday morning mistake: sudo rm -rf --no-preserve-root /
Please note: The answers and comments to this question contains content from another, similar question that has received a lot of attention from outside media but turned out to be hoax question in some kind of viral marketing scheme. As we don't…
Jonas Bylov
- 1,613
- 3
- 11
- 5
149
votes
13 answers
How do I find the UUID of a file system?
I'm running Ubuntu, and want to find out the UUID of a particular filesystem (not partition). I know I can use e2label /dev/sda1 to find out the file system label, but there doesn't seem to be a similar way to find the UUID.
Brad Gilbert
- 2,503
- 2
- 21
- 19
149
votes
12 answers
Should servers be turned off at night?
There is a server that is used from 4:30 am in the morning until ~ 22:00.
Should it be turned off? I think that it is a server and that it won't have a problem to stay on, but serious professors are telling me that it is dangerous and that HD can…
GorillaApe
- 1,379
- 2
- 10
- 11
148
votes
8 answers
Is there a reason to use an SSL certificate other than Let's Encrypt's free SSL?
Let's Encrypt are providing free SSL certificates. Are there any downsides compared to other, paid certificates e.g. AWS Certificate Manager?
ripper234
- 5,890
- 9
- 41
- 49
148
votes
7 answers
Make nginx to pass hostname of the upstream when reverseproxying
I run several docker containers with hostnames:
web1.local
web2.local
web3.local
Routing to these done based on hostname by nginx. I have a proxy in front of this setup (on different machine connected to internet) where I define upstream as:
…
pavel_karoukin
- 1,611
- 2
- 11
- 5
148
votes
5 answers
How to check if an RSA public / private key pair match
I have two files, id_rsa and id_rsa.pub. What command can be used to validate if they are a valid pair?
Ryan
- 5,831
- 24
- 72
- 91
147
votes
5 answers
Job scheduling using crontab, what will happen when computer is shutdown during that time?
I schedule some tasks using crontab.
What will happen if my computer is shutdown or turned off during the time when cron was scheduled to do something?
Does each missed cron job run after computer is turned on, or are missed jobs for that day…
seg.server.fault
- 1,907
- 4
- 16
- 11
147
votes
3 answers
Delete Amazon EC2 terminated instance
I created an Amazon Free tier Usage Account. I launched two amazon ec2 instances using the online tool. After that one instance was created and running while other was pending which quickly shifted to terminated state.
In description it shows State…
Anubhav Agarwal
- 1,603
- 2
- 10
- 6