Greatest Hits

37
votes
7answers
49k views

How can I monitor hard disk load on linux

Is there a good command line utility to monitor hard disk load on linux? Something like top but then monitoring disk activity i.s.o. cpu usage. More specifically, I suspect that for some (heavy load) ...
7
votes
4answers
61k views

How to check if hardware RAID is configured?

I have several servers running Windows 2008 and Red Hat 5 that are capable of hardware RAID. How do I check that hardware RAID is configured?
51
votes
5answers
53k views

Clean way to write complex multi-line string to a variable

I need to write some complex xml to a variable inside a bash script. The xml needs to be readable inside the bash script as this is where the xml fragment will live, it's not being read from another ...
49
16
votes
4answers
23k views

hosts file ignored, how to troubleshoot?

The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods. Often, one decides to change the hosts file, and discovers ...
44
votes
3answers
31k views

What is archive mode in rsync?

I know you can use -a or --archive to activate archive mode when using rsync. Unfortunately, I have no idea what archive mode is supposed to do, and the man page is not at all explicit about what this ...
61
30
votes
6answers
44k views

How to send emails and avoid them being classified as spam

This is a canonical question about how to handle email sent from your server being misclassified as spam. For additional information you may find these similar questions helpful: Best ...
29
votes
2answers
24k views

_default_ VirtualHost overlap on port 443, the first has precedence

I have two ruby on rails 3 applications running on same server, (ubuntu 10.04), both with SSL. Here is my apache config file: <VirtualHost *:80> ServerName example1.com DocumentRoot ...
39
votes
5answers
41k views

How to setup passwordless `sudo` on Linux?

How can passwordless sudo access be setup on either RHEL (Fedora, CentOS, etc) or Ubuntu distributions? (If it's the same across distros, that's even better!) Setting: personal and/or lab/training ...
15
votes
4answers
34k views

Prevent Windows Server 2012 from forcing a reboot after updates

I have a domain controller with Windows Server 2012 on it. After updates, the server does not reboot immediately. However if I remote into the server I will be presented with a countdown for a reboot. ...
10
votes
10answers
51k views

Network Printers Offline (but not really)

I have two Ricoh printers/copiers setup for IP printing in the office. Before this week there were no problems printing to them. Now a handful of them (All running Vista, not sure if it is every Vista ...
33
votes
8answers
5k views

How can I run arbitrarily complex command using sudo over ssh?

I have a system that I can only log in to under my username (myuser), but I need to run commands as other user (scriptuser). So far, I have come up with the following to run the commands I need: ssh ...
11
votes
1answer
57k views

Where/how does Windows store the data in the event logs?

We run some financial systems that log error messages to the system logs. I need to find out if we can clean these error messages from a PCI DSS point of view. I am specificaly interested in the ...
23
votes
4answers
33k views

How do I grep through binary files that look like text?

I have binary files that should be text (they're exported logs), but I can't open it with less (it looks ugly - it looks like a binary file). I found that I could open it with vi and I can cat it ...
5
votes
6answers
65k views

An Active Directory domain controller for this domain could not be contacted

I get the following error. An Active Directory Domain Controller for This Domain Could Not be Contacted and... I have working Internet. I have an Active Directory domain controller set up on ...
5
votes
4answers
21k views

Centos 6.3 Bind hangs on “Generating /etc/rndc.key”

I'm installing bind on a clean Centos 6.3 system. In previous versions that would work like a charm, but now I get Generating /etc/rndc.key when trying to start bind after the installation. ...
19
votes
4answers
72k views

How to filter http traffic in Wireshark?

I suspect my server has a huge load of http requests from its clients. I want to measure the volume of http traffic. How can I do it with Wireshark? Or probably there is an alternative solution using ...
8
votes
2answers
26k views

When an Excel file is locked on a network share, how does it know who locked the file?

We are using Excel 2010 and sometimes users are working from a network share. When a user on the network opens the file in Excel, the file is locked for editing - this is the expected behavior. When ...
26
votes
11answers
39k views

Can't get SSH public key authentication to work

My server is running CentOS 5.3. I'm on a Mac running Leopard. I don't know which is responsible for this: I can log on to my server just fine via password authentication. I've gone through all of ...
57
16
votes
3answers
31k views

How do I upgrade to the latest PHP version in CentOS with yum?

I found some blog posts about this, but it's rather lack of descriptions on possible side effects. I could really use some detailed on these steps: How to add a repo that provides PHP 5.4 into yum ...
3
votes
6answers
26k views

SQL - an error occurred during the pre-login handshake

Until yesterday evening, I was able to connect to my server from my local machine. Now, I get the following error: A connection was successfully established with the server, but then an error ...
7
votes
5answers
54k views

How can I start Oracle Enterprise manager after restarting the Red Hat Server?

I installed Oracle 11g on Red Hat Enterprise server 5.0. First time everything worked well. After creating dbora script file in /etc/init.d/ and setting all the oracle environmental variables I just ...
16
votes
4answers
62k views

How to create Active Directory user account with powershell

I am constantly setting up research and development environments that require active directory accounts. Since we place these environments in isloated networks each environment needs its own active ...
20
votes
2answers
41k views

How do I turn off Oracle password expiration?

I'm using Oracle for development on my local machine. The password for a bootstrap account that I always use to rebuild my database has expired. How do I turn off password expiration for this user ...
55
15
votes
3answers
32k views

how do you create an ssh key for another user?

I'm trying to create an ssh key for another user. I'm logged in as root. Can I just edit the files generated by ssh-keygen and change root to the user I want?
44
votes
5answers
9k views

Monday morning mistake: sudo rm -rf --no-preserve-root /

Here's a an entertaining tragedy. This morning I was doing a bit of maintenance on my production server, when I mistakenly executed the following command: sudo rm -rf --no-preserve-root ...
21
votes
7answers
59k views

Are there any free NFS clients for Windows 7?

I have Windows 7 Professional, but the NFS Client for Windows is only included in the Enterprise and Ultimate editions. I would like to connect some Windows machines to our NFS server so I can drop ...
13
votes
16answers
36k views

Shell Command for Getting IP Address?

Is there a bash command to find the IP address for an Ubuntu box? I need to find the IP address so I can ssh into the machine later.
23
votes
9answers
52k views

How do I find out whether a port is available on Ubuntu 8.04?

Is there any command I can run from bash that will tell me whether a port is already open?
6
votes
4answers
31k views

w1228 romb batt < 24h

I just got this message on the front panel of one of our servers, a Dell PowerEdge 2900. I believe this means that the RAID controller card battery is nearly dead. The question that I have is what ...
16
votes
4answers
31k views

System process (PID 4) constantly accessing the hard disk

Recently I noticed some of our machines are getting sluggish, mainly after boot-up. Using the Resource Monitor I detected excessive disk access from the system process with PID 4. Following some tips, ...
37
votes
1answer
49k views

sudoers: how to disable requiretty per user

I don't want to uncomment the line in /etc/sudoers: Defaults requiretty Instead, I only want a certain user not to require a tty. How can this be done?
45
7
votes
4answers
44k views

How do I configure proxy settings for LOCAL SYSTEM?

If I edit Proxy Settings through the Control Panel, the settings are stored in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable and ...\ProxyServer. These ...
27
votes
8answers
48k views

OpenVPN vs. IPSec - Pros and Cons, what to use?

Interestingly I have not found any good search results when searching for "OpenVPN vs IPSec". So here my question: I need to setup a private LAN over an untrusted network. And as far as I know, both ...
13
votes
3answers
39k views

How to fix “BUG: soft lockup - CPU#0 stuck for 17163091968s”?

UPDATE: I updated the title of the message, because I've recently seen more of these problems with this exact time amount of 17163091968s. This should help people investigating the symptoms to find ...
9
votes
3answers
49k views

How do I know if IP Multicasting is enabled on my network?

Is there a way to know if the Red Hat Linux Servers on my network have IP Multicasting enabled? The output that I get by running the cat /proc/net/igmp command is the following Idx Device : Count ...
45
votes
1answer
48k views

InnoDB: Error: log file ./ib_logfile0 is of different size

I just added the following lines in /etc/mysql/my.cnf after I converted one database to use InnoDB engine. innodb_buffer_pool_size = 2560M innodb_log_file_size = 256M innodb_log_buffer_size = 8M ...
23
votes
8answers
46k views

how to find out mac addresses of all machines on network

Is there some easy way to find out mac address of all machines on my network rather than doing an SSH into each and ifconfig | grep HWaddr if there are 300 machines on network I really need some easy ...
53
votes
6answers
12k views

Heartbleed: are services other than HTTPS affected?

The OpenSSL 'heartbleed' vulnerability (CVE-2014-0160) affects webservers serving HTTPS. Other services also use OpenSSL. Are these services also vulnerable to heartbleed-like data leakage? I'm ...
25
votes
5answers
39k views

How to install git to red hat enterprise linux 5.3 x64?

How can I configure yum to use some repository which has git rpms?
3
votes
0answers
14k views

Windows 7 there are no logon servers available to service the logon request subdomain

I've read other solutions, but my problem is slighlty different. Problem occurs in domain environment. We work in a subdomain, but we also have some employees coming with notebooks registered in top ...
91
votes
24answers
28k views

How do I prevent accidental rm -rf /*?

I just ran rm -rf /* accidentally, but I meant rm -rf ./* (notice the star after the slash). alias rm='rm -i' and --preserve-root by default didn't save me, so are there any automatic safeguards for ...
12
votes
4answers
42k views

How do you wait for an exe to complete in batch file?

I'm trying to create a script to execute an exe on shutdown in order to install sp1. my script goes something like (not actual bat script). If installed GOTO END Install.exe END: My problem is ...
76
votes
2answers
35k views

IPTABLES - Limit rate of a specific incoming IP

I do not wish to limit the rate of a specific service. My goals is to limit rate based solely on the incoming IP address. For example using a pseudo-rule: john.domain.local (192.168.1.100) can only ...
28
votes
6answers
43k views

How to interrupt software raid resync?

I want to interrupt a running resync operation on a debian squeeze software raid. (This is the regular scheduled compare resync. The raid array is still clean in such a case. Do not confuse this with ...
2
votes
6answers
72k views

Outlook + Exchange : Sync Issues Folder - How to manage it?

When using Microsoft Outlook with Exchange (not the online only mode) a Sync Issues folder that appears in the local PST folder. From the link above I know why it exists - but often that information ...
8
votes
7answers
54k views

“Error 1067: The process terminated unexpectedly” when trying to install MySQL on Win7 x64

I've run into a brick wall trying to install MySQL v5.5 on my machine. My PC is Windows 7 x64, Enterprise edition. MySQL installs fine, but when I run the "MySQL Instance Configuration Wizard", it ...
44
votes
3answers
8k views

Isn't Ctrl-Alt-Delete on Linux *really* dangerous?

Is the default Ctrl-Alt-Delete shutdown -r functionality on Linux systems a dangerous feature? Years ago, when I deployed physical systems with attached keyboards and monitors, I'd sometimes modify ...
9
votes
4answers
27k views

Nginx 1 FastCGI sent in stderr: “Primary script unknown”

My first time using Nginx, but I am more than familiar with Apache and Linux. I am using an existing project and when ever I am trying to see the index.php I get a 404 File not found. Here is the ...
14
votes
2answers
39k views

View Shutdown Event Tracker logs under Windows Server 2008 R2

I'm trying to view the Shutdown Event Tracker logs in the Event Viewer, on windows server 2008 r8, but I can't find the messages that I supplied when previously restart the server. Where in the Event ...
52
votes
10answers
37k views

How can I get the size of an Amazon S3 bucket?

I'd like to graph the size (in bytes, and # of items) of an Amazon S3 bucket and am looking for an efficient way to get the data. The s3cmd tools provide a way to get the total file size using s3cmd ...