Greatest Hits

74
votes
9answers
82k views

When does `cron.daily` run?

When do entries in cron.daily (and .weekly and .hourly) run, and is it configurable? I haven't found a definitive answer to this, and am hoping there is one. I'm running RHEL5 and CentOS 4, but for ...
8
votes
8answers
50k views

Get list of AD groups a user is a member of

Suppose I have the user id of a user in Active Directory. I'd like to get a list of all AD groups in which that user is currently a member of. How can I do this from the Windows command line? I've ...
30
votes
2answers
69k views

DNS - NSLOOKUP what is the meaning of the non-authorative answer?

When I do a NS Lookup, for some domains I get the reply saying Non-authorative answer:. I want to know what it means? Got answer: HEADER: opcode = QUERY, id = 3, rcode = NXDOMAIN ...
75
votes
8answers
34k 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. ...
47
votes
4answers
136k views

How can I port forward with iptables?

I want connections coming in on ppp0 on port 8001 to route to 192.168.1.200 on eth0 on port 8080 I've got these two rules -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination ...
69
votes
13answers
74k views

How to reconnect to a disconnected ssh session

Is there a way to connect to an ssh session that was disconnected? We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we ...
48
votes
7answers
76k views

how to check if a library is installed?

In linux, how do I check if a library is installed or not? (from the command line of course). In my specific case now, I want to check whether libjpeg is installed.
25
votes
6answers
113k views

Disable password complexity rule in Active Directory

Where do I go to disable the password complexity policy for the domain? I've logged onto the domain controller (Windows Server 2008) and found the option in local policies which is of course locked ...
99
votes
2answers
40k views

How do I select which Apache MPM to use?

I'm a little confused between the different MPMs offered by Apache - 'worker', 'event', 'prefork', etc. What are the major differences between them, and how can I decide which one will be best for a ...
47
votes
14answers
121k views

What is the correct temperature for a server room?

When I was working in our server room, I noticed that it was very cold. I know that the server room has to be cold to offset the heat of the servers, but perhaps it is TOO cold. What is an ...
97
votes
14answers
53k views

How do diff over ssh?

How do I diff files/folders across machines provided that the only connectivity available is ssh?
139
15
votes
7answers
64k views

How do I remove login credentials for a network location in Win7?

I just tried to access a folder like so: \\somecomputeronmynetwork\somelocation$ When going to this location I'm prompted for a user name and password. I put one in, and it let me in fine. Now I ...
17
votes
6answers
55k views

How can I edit the welcome message when ssh start?

I have a vps for my website hosting. It is running a ubuntu server. Every time I logged in my server by ssh, it displays a lengthy welcome message in my terminal. Linux node61.buyvm.net ...
11
votes
9answers
84k views

Windows File and Folder “Attributes” A or C

In Windows Server 2003, in the "Attributes" column of windows explorer, some files have "A" or "C" or "AC" or others. What do these mean?
28
votes
10answers
76k views

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 ...
14
votes
9answers
114k 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 ...
59
votes
3answers
61k views

Why is my crontab not working, and how can I troubleshoot it?

This is a Canonical Question about using cron & crontab. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with ...
82
65
votes
6answers
64k views

Can I automatically add a new host to known_hosts?

Here's my situation; I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via SSH. The virtual machines will ...
52
votes
9answers
62k views

Finding out what user Apache is running as?

I want to secure a file upload directory on my server as described beautifully here, but I have one problem before I can follow these instructions. I don't know what user Apache is running as. I've ...
1
vote
4answers
33k views

Windows Server 2012 r2 Standard Activation Issue - MAK license

I am trying to activate MS Server 2012 R2 Standard and I'm having issues. I have installed the software from the ISO file I downloaded from the volume licensing site. I have learned that this file ...
21
votes
4answers
75k views

Get directory containing the currently executed batch script

I use %0 in batch file to get the containing directory of the batch file but the result is :- c:\folder1\folder2\batch.bat I want just directory, without batch file name, like this :- ...
22
votes
9answers
89k views

Group Policy installation failed error 1274

I'm trying to deploy an MSI via the Group Policy in Active Directory. But these are the errors I'm getting in the System event log after logging in: The assignment of application XStandard from ...
7
votes
5answers
87k views

Cannot enable network discovery on Windows Server 2008 R2

I'm trying to enable the Network Discovery feature on a newly installed Windows Server 2008 R2 instance. The network connection is in the Home or Work profile (it is not domain joined). These are the ...
79
votes
14answers
72k views

In my /etc/hosts/ file on Linux/OSX how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to m /etc/hosts/ file? If it's not possible, how do I work around this problem? I need ...
81
votes
7answers
72k views

How can I run Debian stable but install some packages from testing?

Say you're running a server and you don't want to upgrade to Testing (Squeeze) from Stable (Lenny) to just install a required package or two. What's the best way of installing only certain packages ...
55
votes
3answers
67k views

How to add dependency on a Windows Service AFTER the service is installed

I have a Windows Service that makes use of a SQL Server database. I don't have control over the installation of the service, but would like to add a dependency on the service to ensure that it starts ...
114
votes
16answers
96k views

Why is DNS failover not recommended?

From reading, it seems like DNS failover is not recommended just because DNS wasn't designed for it. But if you have two webservers on different subnets hosting redundant content, what other methods ...
31
votes
13answers
55k views

How to create an SHA-512 hashed password for shadow?

The previous SF questions I've seen have lead to answers that produce MD5 hashed password. Does anyone have a suggestion on to produce an SHA-512 hashed password? I'd prefer a one liner instead of a ...
55
votes
9answers
62k views

How can I export the privileges from MySQL and then import to a new server?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server. For extra points, there are a couple of existing databases on the new ...
348
votes
13answers
63k views

How do I deal with a compromised server?

This is a Canonical Question about Server Security - Responding to Breach Events (Hacking) See Also: Tips for Securing a LAMP Server Reinstall after a Root Compromise? Canonical ...
1
vote
8answers
102k views

User Profile keeps loading TEMP Profile

I am having a difficult time with an issue that our support staff won't support (as they will not support Vista). I am able to log into our domain without any issue, however, when I go home and log ...
91
35
votes
3answers
49k views

What is the difference between unicast, anycast, broadcast and multicast traffic?

I have never had the privilege of working in an environment that required complicated routing or if it did require it, it was handled upstream of me. I've always used very simple static routing ...
246
votes
27answers
59k views

100% uptime for a web application

We received an interesting "requirement" from a client today. They want 100% uptime with off-site failover on a web application. From our web application's viewpoint, this isn't an issue. It was ...
32
votes
7answers
57k views

df in linux not showing correct free space after file removal

I have file servers which are used to store files. Files might reside there for a week, or for a year. Unfortunately, when I remove files from the server, df command doesnt reflect the freed up space, ...
8
votes
4answers
42k views

What is a domain controller, when is it needed, and how to set it up?

I would like to know what do we mean by Domain controller and how do we make a system a Domain Controller and when do we have to make a system a DC?
20
votes
2answers
23k views

ia32-libs : Depends: ia32-libs-i386 but it is not installable

I am trying to install ia32-libs (a dependency to build the VirtualBox sources) on my Debian x86_64 box, however it's giving me the error: The following packages have unmet dependencies: ia32-libs : ...
16
votes
2answers
96k views

I cannot connect to my local SQL Server 2008?

I've just installed SQL Server 2008 and I cannot connect to it with SQL Server Management Studio. My intention is to just let my local windows user be authenticated but I am not totally sure how to do ...
28
votes
14answers
65k views

What is a patch panel?

What is a patch panel? How it is different from (layer 2) switch? EDIT: I think my primary question (and confusion) is this: Why don't network connections go straight to the switch? Don't we still ...
62
votes
11answers
67k views

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

I keep getting this warning when I (re)start Apache. * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ...
31
votes
4answers
82k views

Adding a directory to $PATH in CentOS?

We just got our new server(s) up and we're running CentOS on them all. After successfully installing Ruby Enterprise Edition, I would now like to add the REE /bin (located at ...
17
votes
3answers
111k views

How to properly set permissions for NFS folder? Permission denied on mounting end.

I'm trying to connect to an NFS folder on my dev server. The owner of the folder on the dev server is darren and group darren. When I export and mount it to my Mac using the Disk Utility it mounts, ...
9
votes
4answers
27k views

Best way to gracefully restart CentOS?

I always used the command: shutdown -r now However, sometimes that causes MySQL issues. What's the most graceful way to restart CentOS? I've seen: reboot and halt How can I gently reboot ...
16
votes
3answers
81k views

How to write ISO image to usb memory stick from linux command-line?

I'm having trouble figuring out how I would write an ISO disk image to a USB flash memory device from the command line in Ubuntu. I have the Startup Disk Creator utility, but I need to be able to ...
8
votes
4answers
134k views

What's the default username and password for an Ubuntu Live CD?

What's the username and password for an Ubuntu Live CD image? I ask cause I've recently copied the contents of an Ubuntu based live ISO (easypeasy, the ldistro for nwtbooks) onto a harddisk, but the ...
50
votes
15answers
52k views

Showing total progress in rsync: is it possible?

I have searched for this option already, but have only found solutions that involve custom patching. The fact that it does not show in --help and no more info can be found probably indicates the ...
102
3
votes
3answers
32k views

SSH: Permission denied (publickey,gssapi-with-mic,password)

==================================================================== UPDATE: It turned out the configuration of sshd on host2 wont allow password login. Thanks to people answered this. Also don't ...
26
votes
3answers
74k views

Proxy Error 502 “Reason: Error reading from remote server” with Apache 2.2.3 (Debian) mod_proxy and Jetty 6.1.18

Apache is receiving requests at port :80 and proxying them to Jetty at port :8080 The proxy server received an invalid response from an upstream server The proxy server could not handle the request ...
13
votes
9answers
93k views

Unable to connect to mysql through JDBC connector through Tomcat or externally

I've installed a stock mysql 5.5 installation, and while I can connect to the mysql service via the mysql command, and the service seems to be running, I cannot connect to it through spring+tomcat or ...
18
votes
6answers
57k views

How do I access the list of currently logged on users through Terminal Services Manager in Windows Server 2012?

In Windows 2003 and 2008 we had Terminal Services Manager (see screenshot below). However in Windows server 2012 it's gone. Does anyone know how to access the list of currently remotely logged on ...
24
votes
10answers
82k views

How to take ownership of files from the command line?

Every so often I run into a file that I need to take ownership of. I normally use cacls for changing ntfs permissions, but it doesn't seem to do ownership. Under *nix I would run something like ...