Greatest Hits

51
votes
6answers
439k 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 ...
50
votes
8answers
312k 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 ...
302
votes
3answers
288k 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 ...
17
votes
8answers
540k 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 ...
70
votes
6answers
474k views

What port does SFTP use?

Does SFTP use port 21 or port 22?
266
82
votes
2answers
137k 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 ...
176
votes
16answers
331k 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.
313
325
votes
7answers
59k 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 ...
407
164
votes
18answers
198k 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 ...
14
votes
13answers
223k 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 ...
65
votes
8answers
155k 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 ...
114
votes
13answers
297k 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 ...
106
votes
6answers
169k 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?
210
votes
11answers
241k 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 ...
36
votes
8answers
254k 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 ...
60
votes
9answers
155k 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 ...
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 ...
165
votes
5answers
122k 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 ...
70
votes
10answers
207k 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 ...
113
votes
26answers
211k 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 ...
164
votes
11answers
32k 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 ...
88
votes
15answers
74k 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 ...
53
votes
7answers
183k 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
281k 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?
244
votes
33answers
89k 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 ...
244
8
votes
4answers
43k 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 ...
248
votes
15answers
172k 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
182k 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?
86
votes
4answers
99k views

Can scp copy directories?

Now I can only copy a single tar file,how can I copy directories recursively with scp?
179
80
votes
8answers
134k 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
44k 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
163k 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 ...
43
votes
5answers
110k 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
93
votes
15answers
146k 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 ...
169
79
votes
6answers
98k 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
174k 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 ...
23
votes
6answers
164k views

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

I want to see if traffic gets through on a specific port on another machine. Is there a simple way to test for this?
175
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 ...
22
votes
13answers
180k 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
153k 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 ...
24
votes
3answers
98k 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 ...
73
votes
8answers
31k views

Heartbleed: how to reliably and portably check the OpenSSL version?

I was looking at a reliable and portable way to check the OpenSSL version on GNU/Linux and other systems, so users can easily discover if they should upgrade their SSL because of the Heartbleed bug. ...
45
votes
10answers
69k 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 ...
18
votes
9answers
118k 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
75
votes
7answers
56k 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 ...
74
votes
5answers
191k 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 ...
156
votes
10answers
63k 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".
164
47
votes
10answers
101k 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?
115
votes
5answers
157k 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.
67
votes
9answers
127k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
132