Most Popular

1500 questions
87
votes
5 answers

How does Ubuntu keep track of the "System restart required" flag in motd?

I have a few Ubuntu servers (8.10, 9.10) that is set to automatically install security updates. Some times these updates requires a restart of the system, and this string is shown in motd: *** System restart required *** To get a notice about…
Anders Lindahl
  • 1,011
  • 1
  • 10
  • 12
87
votes
86 answers

Best system administrator accident

I'm looking for amusing stories of system administrator accidents you have had. Deleting the CEO's email, formatting the wrong hard drive, etc. I'll add my own story as an answer.
Alan H
  • 2,284
  • 4
  • 20
  • 17
87
votes
6 answers

Assign Public IP (not Elastic IP) after instance launched

When I launch instance in AWS console I can set "Auto-assign Public IP" to true and newly created instance will be assigned with public IP address from pool. Now assume I have launched instance with this setting set to false and want to assign…
Yaroslav Admin
  • 1,098
  • 1
  • 10
  • 15
87
votes
12 answers

create home directories after create users

I created some users with: $ useradd john and I forgot to specify the parameter -m to create the home directory and to have the skeleton files copied to each user. now I want to do that, and I don't want to recreate all users (there must be an…
cd1
  • 1,484
  • 4
  • 12
  • 17
87
votes
7 answers

Temporarily ignore my `~/.ssh/known_hosts` file?

Is there a way to temporarily ignore my ~/.ssh/known_hostsfile? mbp:~ alexus$ ssh 10.52.11.171 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! …
alexus
  • 13,112
  • 32
  • 117
  • 174
87
votes
5 answers

How to get TX/RX bytes without ifconfig?

Since ifconfig is apparently being deprecated in major Linux distributions, I thought I'd learn something about the ip tool that's supposed to be used instead of ifconfig. And here I ran into a problem: when run on its own, ifconfig shows the…
justinas
  • 1,008
  • 1
  • 8
  • 8
87
votes
3 answers

Human readable format for http headers with tcpdump

I would like to view the HTTP headers sent from Apache (listening on port 80) to Tomcat (on port 4080) in a Linux machine. According to Wikipedia, Header fields are colon-separated name-value pairs in clear-text string format. I've tried some…
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
87
votes
3 answers

What happens when you plug two sides of a cable to a single networking device?

What is likely to happen when you plug two ends of a network cable to a single switch/router? Will this create problems on the network, or just be ignored?
lisa1987
  • 881
  • 1
  • 9
  • 17
87
votes
4 answers

How to keep rsync from chown'ing transferred files?

I have an sshfs connection setup with a remote filesystem on a Linux server. I'm doing an rsync from my local server to the ftpfs-filesystem. Because of the nature of this setup, I can't chown anything on the sshfs filesystem. When I do the rsync,…
Jake Wilson
  • 8,814
  • 29
  • 97
  • 125
87
votes
16 answers

Reread partition table without rebooting?

Sometimes, when resizing or otherwise mucking about with partitions on a disk, cfdisk will say: Wrote partition table, but re-read table failed. Reboot to update table. (This also happens with other partitioning tools, so I'm thinking this is a…
Teddy
  • 5,204
  • 1
  • 23
  • 27
87
votes
9 answers

pg_dump and pg_restore: input file does not appear to be a valid archive

I have used pg_dump on one machine and copied result file to another, where I tried to restore it. I believe schema is the same. However, I get: pg_restore: [archiver] input file does not appear to be a valid archive I have done following…
gruszczy
  • 973
  • 1
  • 7
  • 7
86
votes
9 answers

Service start request repeated too quickly, refusing to start limit

I have a systemd service that displays the following error service start request repeated too quickly, refusing to start I understand that the service is configured to restart on failure and it is restarting again and again. But when exactly does…
Vikas Tiwari
  • 983
  • 1
  • 6
  • 6
86
votes
3 answers

Multiple TXT fields for same subdomain

I would like to understand if multiple TXT records for the same subdomain are ok or could lead to issues. In particular, we have the requirement for one SPF record and one Google Domain Verification record on the root domain. In AWS Route 53 they…
chrisvdb
  • 1,279
  • 2
  • 12
  • 15
86
votes
9 answers

Making `wget` not save the page

I'm using the wget program, but I want it not to save the html file I'm downloading. I want it to be discarded after it is received. How do I do that?
Ram Rachum
  • 5,231
  • 7
  • 34
  • 46
86
votes
5 answers

What is the difference between Nginx variables $host, $http_host, and $server_name?

What is the difference between the three Nginx variables $host, $http_host, and $server_name? I have a rewrite rule where I'm not sure which one I should be using: location = /vb/showthread.php { #…
Jeff Widman
  • 2,465
  • 4
  • 24
  • 20