Greatest Hits

52
votes
6answers
445k views

How to determine the hostname from an IP address in a Windows network?

My LAN has 50 Windows hosts. At the Windows command line I try ping to get the IP address of a running Windows machine. The question is how to get hostname of a specific IP address in the same ...
320
votes
3answers
300k views

What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

I am responsible for maintaining two Debian servers. Every time I have to do anything with security certificates, I Google for tutorials and beat away until it finally works. However, in my searches ...
53
votes
8answers
321k views

Command line to list users in a Windows Active Directory group?

Is there a command line way to list all the users in a particular Active Directory group? I can see who is in the group by going to Manage Computer --> Local User / Groups --> Groups and double ...
71
votes
6answers
487k views

What port does SFTP use?

Does SFTP use port 21 or port 22?
276
17
votes
8answers
542k views

How to format as FAT32 from Windows 7/Vista

What is the best way to format a USB drive with FAT32 (for Mac compatibility) from within Windows 7/Vista? I ask because the Disk Management only lets you pick exFAT (because the disk is over 32GB I ...
188
votes
17answers
350k views

Ping a Specific Port

Just a quick sanity check here. Can you ping a specific port of a machine, and if so, can you provide an example? I'm looking for something like ping ip address portNum.
330
83
votes
2answers
141k views

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 ...
171
votes
18answers
208k views

How do I tell Git for Windows where to find my private RSA key?

My GIT setup runs fine in Linux, but when I try to set things up under Windows (using Git for Windows and TortoiseGit), I don't know where to put my private ssh key (or, better still, how to tell ssh ...
336
votes
7answers
60k views

Something is burning in the server room; how can I quickly identify what it is?

The other day, we notice a terrible burning smell coming out of the server room. Long story short, it ended up being one of the battery modules that was burning up in the UPS unit, but it took a good ...
408
70
votes
8answers
162k views

How to automate SSH login with password?

How to automate SSH login with password? I'm configuring my test VM, so heavy security is not considered. SSH chosen for acceptable security with minimal configuration. ex) echo password | ssh ...
107
votes
6answers
179k views

What's the default superuser username/password for postgres after a new install?

I have just installed postgres 8.4 on Ubuntu 9.10 and it has never asked me to create a superuser. Is there a default superuser and its password? If not, how do I create a new one?
115
votes
13answers
303k views

Why do I get “Permission denied (publickey)” when trying to SSH from local Ubuntu to a Amazon EC2 server?

I have an instance of an application running in the cloud on Amazon EC2 instance, and I need to connect it from my local Ubuntu. It works fine on one of local ubuntu and also laptop. I got message ...
14
votes
13answers
226k views

Error 0x80070570: How to delete corrupted and unreadable file?

On my system partition I have a folder which cannot be deleted. This folder has been created by restoring files from an Acronis TrueImage backup. The error message says: Error 0x80070570: The ...
216
votes
11answers
252k views

How to determine if a bash variable is empty?

What is the best way to determine if a variable in bash contains ""? I have heard it recommended that I do if [ "x$variable" = "x" ] Is that the correct way? (there must be something more ...
37
votes
8answers
259k views

What does “TTL expired in transit” mean on a ping attempt?

We get the message “TTL expired in transit” when we try to ping to a server in a different network segment. When we run tracert, 4 ip addresses repeat themselves indefinitely: 14 60 ms 59 ms ...
62
votes
9answers
156k views

Can't seem to disable Java Automatic Update

I'm just tweaking out my new Windows 7 laptop and wanted to disable the automatic Java updating (and thus kill the silly jusched.exe background process), but I can't seem to get it to actually turn it ...
16
votes
4answers
21k views

How do I patch RHEL 4 for the bash vulnerabilities in CVE-2014-6271 and CVE-2014-7169?

A mechanism for remote code execution through Bash has been widely reported yesterday and today (September 24, 2014.) http://seclists.org/oss-sec/2014/q3/650 Reported as CVE-2014-7169 or CVE-2014-6271 ...
172
votes
5answers
129k views

In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?

I want to rewrite all http requests on my web server to be https requests, I started with the following: server { listen 80; location / { rewrite ^(.*) https://mysite.com$1 ...
5
votes
10answers
54k views

Install .NET 3.5 SP1 on Windows 7 RC

While attempting to install .NET 3.5 SP1 on a fresh install of Windows 7 RC, nothing happens. The machine gives a UAC prompt. When selecting Yes, nothing happens. Using the full redistributable ...
73
votes
10answers
218k views

What's the command-line utility in Windows to do a reverse DNS look-up?

Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like <toolname> w.x.y.z => mycomputername I've tried: nslookup: seems to be forward ...
115
votes
26answers
216k views

Using DD for disk cloning

There's been a number of questions regarding disk cloning tools and dd has been suggested at least once. I've already considered using dd myself, mainly because ease of use, and that it's readily ...
9
votes
4answers
49k views

Outlook 2013: how to reset to “first run” status?

TL;DR Is there a way via script, powershell, reg delete, via telekinesis, whatever to reset Outlook 2013 as if no profiles ever existed and it was running for the first time ever? Still working ...
90
votes
15answers
75k views

How do you install Node.JS on CentOS?

I've found numerous installation instructions for Node.js but they all seem so complicated -- I'm not a super sys admin but I can get around. I have yum on the system, but I didn't find any node.js ...
164
votes
11answers
34k views

Is it bad to redirect http to https?

I just installed an SSL Certificate on my server. I use a web hosting panel called ZPanel that is an open source project. It then set up a redirect for all traffic on my domain on Port 80 to ...
259
votes
33answers
94k views

How can I sort du -h output by size

I need to get a list of human readable du output. However, du does not have a "sort by size" option, and piping to "sort" doesn't work with the human readable flag. For example, running: du | sort ...
257
53
votes
7answers
189k views

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 ...
43
votes
5answers
287k views

How to check if a port is blocked on Windows?

What is the easiest way to check if port 3306 on my localhost is being blocked?
97
votes
4answers
106k views

Can scp copy directories?

Now I can only copy a single tar file,how can I copy directories recursively with scp?
195
250
votes
15answers
176k views

How do you find what process is holding a file open in Windows?

One thing that annoys me no end about Windows is the old "sharing violation" error. Often you can't identify what's holding it open. Usually it's just an editor or explorer just pointing to a relevant ...
44
votes
10answers
186k views

How to start/stop iptables on Ubuntu?

How can I start/stop the iptables service on Ubuntu? I have tried service iptables stop but it is giving "unrecognized service". Why is it doing so? Is there any other method?
46
votes
5answers
114k views

How to make Windows 7 USB flash install media from Linux?

I have: ISO image of Windows 7 install media 4 GB USB flash drive no DVD drive Linux installed
82
votes
8answers
139k views

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I ...
10
votes
3answers
45k views

How do I cleanly remove apache2 server on ubuntu server and then reinstall?

I am having some wierd issues with Apache2 server on my ubuntu server. I believe some configuration files may have been tampered with. What is the easiest way to remove apache2 completely from my ...
18
votes
8answers
168k views

How do I get this SQL Server ODBC Connection working?

Note: I've obviously changed the server names and IPs to fictitious ones. Here's what's going on. I've got a server, which I'm calling MYSERVER, running Microsoft SQL Server Express 2005. Right on ...
98
votes
15answers
149k views

How to use rsync over FTP

Any unix: I have the following cmd line which works fine. rsync -avr -e ssh /home/dir user@example.com:/home/ But I need to set it up now to rsync to a remote server that only has an FTP server on ...
173
81
votes
6answers
101k views

How can I find out what AD groups I'm a member of?

I'm running a Windows XP desktop in a corporate environment. How can I find out what AD groups I belong to?
44
votes
5answers
177k views

What's the difference between Windows Server 2008, 2008 SP2 and 2008 R2?

What are the major differences between Windows Server 2008, 2008 SP2 and 2008 R2? Are the code bases for these OSes different? If I'm developing applications for any one of these three, should I be ...
26
votes
6answers
168k views

In Windows, using the command line, how do you check if a remote port is open?

What is a simple way in Windows to test if traffic gets through to a specific port on a remote machine?
25
votes
3answers
105k views

Can you pass user/pass for HTTP Basic Authentication in URL parameters?

I believe this is not possible, but someone I know insisted that it works. I don't even know what parameters to try, and I haven't found this documented anywhere. I tried ...
22
votes
13answers
183k views

How to get a list of all IP addresses (and ideally device names) on a LAN?

Our network gave an error that there was an IP address conflict and I'd like to find what all the device IP addresses are. (I've also had need of that before). (update/clarification:I'm looking for a ...
20
votes
4answers
157k views

How to check who is currently logged on to windows workstation from command line?

Environment is in domain, server is Windows Server 2003, workstations have Vista and XP installed. I need the way to check remotely who is currently logged on workstation, preferably from some simple ...
78
votes
7answers
59k views

How to force or redirect to SSL in nginx?

I have a signup page on a subdomain like: https://signup.mysite.com It should only be accessible via HTTPS but I'm worried people might somehow stumble upon it via HTTP and get a 404. My ...
48
votes
10answers
71k views

IIS 7.5 (Windows 7) - HTTP Error 401.3 - Unauthorized

I'm trying to test my ASP.Net website on localhost and I'm getting this error: HTTP Error 401.3 - Unauthorized You do not have permission to view this directory or page because of the access control ...
53
votes
9answers
105k views

What version of RHEL am I using?

How can I determine from the shell with no privileges what the Red Hat Enterprise Linux version is, for example is it RHEL 4 or RHEL 5.1?
18
votes
9answers
123k views

Check if port is open or closed on a Linux server using SSH?

How can I check if a port is open or closed on a Linux server (running Cent OS 5 and cPanel) using SSH? EDIT: And how can I open the port if it is closed? Thanks, James
174
votes
9answers
27k views

Heartbleed: What is it and what are options to mitigate it?

This is a Canonical Question about understanding and remediating the Heartbleed security issue. What exactly is CVE-2014-0160 AKA "Heartbleed"? What is the cause, what OSs and versions of OpenSSL ...
37
votes
11answers
135k views

Should I use my ISP's DNS, or Google's 8.8.8.8?

It seems like a good idea to use Google's public DNS 8.8.8.8 and 8.8.4.4 because it's really fast -- much faster than my own ISP's DNS! -- and probably more reliable, too. That seems like a ...
157
votes
10answers
64k views

How to tell which local branch is tracking which remote branch in Git?

I would like to know if there's a way to tell which local branch is tracking which remote branch in Git. I'm using one remote server, which is named "origin".
169
116
votes
5answers
161k views

MySQL: Bind to more than one IP address?

Is there a secret way to bind MySQL to more than one IP address? As far as I can see the bind-address parameter in the my.cnf does not support more than one IP and you can't have it more than once.
76
votes
5answers
195k views

Does Windows have a built-in ZIP command for the command line?

Since Windows Explorer (since at least Windows XP) has some basic support for ZIP files, it seems like there should be a command-line equivalent, but I can't seem to find any sign of one. Does ...