Greatest Hits

45
votes
5answers
370k 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 ...
372
15
votes
8answers
529k 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 ...
298
votes
7answers
56k 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 ...
402
43
votes
8answers
254k 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 ...
54
votes
5answers
385k views

What port does SFTP use?

Does SFTP use port 21 or port 22?
223
72
votes
2answers
112k 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 ...
216
votes
3answers
209k views

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

I'm pretty much a n00b at system administration and I am responsible for maintaining two Debian servers. Every time I have to do anything with security certificates, I google for tutorials and beat ...
14
votes
13answers
204k 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 ...
102
votes
13answers
257k 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 ...
122
votes
13answers
137k 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 ...
56
votes
8answers
144k 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 ...
131
votes
14answers
221k 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.
218
5
votes
10answers
52k 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 ...
28
votes
8answers
214k 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 ...
163
votes
11answers
176k 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 ...
73
votes
7answers
109k 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?
46
votes
8answers
104k 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 ...
102
votes
25answers
179k 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 ...
42
votes
5answers
243k 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?
41
votes
10answers
153k 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?
45
votes
6answers
145k 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 ...
54
votes
8answers
144k 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 ...
126
votes
4answers
85k 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
14answers
56k 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 ...
10
votes
3answers
34k 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 ...
17
votes
8answers
134k 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 ...
42
votes
5answers
159k 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 ...
21
votes
13answers
158k 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 ...
84
votes
15answers
125k 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 ...
138
20
votes
5answers
138k 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?
232
votes
15answers
145k 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 ...
67
votes
8answers
102k 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 ...
37
votes
5answers
93k 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
16
votes
10answers
91k 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
187
votes
33answers
62k 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 ...
159
72
votes
5answers
167k 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 ...
55
votes
6answers
72k 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?
42
votes
9answers
57k 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 ...
138
votes
10answers
53k 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".
140
14
votes
3answers
37k views

Debian 5.0 (lenny) apt sources fail?

For the past few days, I couldn't update our apt-sources on Debian 5.0 (lenny). I get the following errors. W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/main/binary-amd64/Packages 404 ...
9
votes
5answers
71k views

Get IP addresses and Computer Names in the Same Network

What is the command that can be used to get the IP address and the names of the computers that are located in the same network? I am running Windows
57
votes
9answers
104k views

How to refresh hosts file without rebooting

On Windows, how do you refresh the hosts file without rebooting?
107
91
votes
9answers
130k 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.
127
votes
3answers
81k views

What's the best way of handling permissions for apache2's user www-data in /var/www?

Has anyone got a nice solution for handling files in /var/www/ ? We're running Name Based Virtual Hosts and the apache2 user is 'www-data' We've got two regular users & root. So when messing ...
79
votes
7answers
86k views

How do I share a Git repository with multiple users on a machine?

I have a Git repository on a staging server which multiple developers need to be able to pull to. git-init seems to have a flag very close to what I'm looking for: --shared, except I'd like multiple ...
24
votes
4answers
38k views

how do I upgrade from php 5.3 to php 5.4.6 in ubuntu?

Is there an easy way out to get the latest PHP? I have tried updating my package but none of it has 5.4.6 yet.. if anyone knows on how to do it quickly, can it be shared here? I've tried compiling ...
96
14
votes
4answers
58k 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 ...
45
votes
10answers
101k views

Run Oracle SQL script and exit from sqlplus.exe via command prompt

I would like to run an Oracle script through SQL Plus via a Windows command prompt. The script does not contain an "exit" command, but I would still like SQL Plus to exit, returning control to the ...
50
votes
4answers
55k views

Can scp copy directories?

Now I can only copy a single tar file,how can I copy directories recursively with scp?
104
10
votes
8answers
105k views

Disable TeamViewer from “stealing” Port 80?

How can you disable TeamViewer from using/reserving port 80? I am certain in the previous version <v4.1.6 there used to be a radio button option in "options" which disabled it from needing it, but ...