Q. I'm logged in as a non-privileged user and would like to change file permissions. How do I do that without logging out?
A. 1. First you have to open the command prompt as a privileged user. That can be found under Start -> "All Programs" -> Accessories. Right-click on the "Command prompt" icon and select "Run-As".
2. Once prompted, enter username and password.
3. On the command line, you can use a comman called CACLS. Here's the full list of things that it can do:
This is a bit dated, but I still come back to it. A small script (using regex) that parses apache log files. The data breakdown required:
IP ADDRESS - -
Server Date / Time [SPACE]
"GET /path/to/page
HTTP/Type Request"
Success Code
Bytes Sent To Client
Referer
Client Software
Q. My Exchange server crashed and I'm trying to mount the database, with no luck.
This is the error that I get:
--------------------------------------------------------
Microsoft Exchange Error
--------------------------------------------------------
Failed to mount database 'Mailbox Database'.
Mailbox Database 0610509261
Failed
Error:
Couldn't mount the database that you specified. Specified database: Mailbox Database; Error code: An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)
. [Database: Mailbox Database, Server: server.domain.local].
An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)
. [Database: Mailbox Database, Server: server.domain.local]
An Active Manager operation failed. Error: Operation failed with message: MapiExceptionCallFailed:
. [Server: server.domain.local]
MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)
Here's how you would iterate through multidimensional hashes in Perl:
Create a hash first:
#!/usr/bin/perl
use warnings;
use strict;
my %HoH = (
flintstones => {
husband => "fred",
wife => "wilma",
pal => "barney",
},
jetsons => {
husband => "george",
wife => "jane",
"his boy" => "elroy", # Key quotes needed.
},
simpsons => {
husband => "homer",
wife => "marge",
kid => "bart",
},
);
Q. I have a Linux server that connects to the external network and internal. Both network cards have a gateway. How can I set it up, so that it can access both networks?
A. You would need to set up source routing. This can be done fairly easily, following those steps:
Open up /etc/iproute2/rt_tables, add those two at the bottom:
Q. I did a fresh install of Windows 2008 R2 and my DNS memory consumption is going through the roof. If I reboot, it's ok briefly, but then it goes up again. How can I stop it?
A. There are a lot of discussions about DNS high memory utilization on Windows 2008 R2 floating around. A lot of them point to disabling EDNS, which does not decrease the memory usage. The real problem is in fact due to the ports that DNS opens up: 2500 UDP IPv4 and 2500 UDP IPv6. This is a nice and round number for a busy production DNS server, however, for an internal DNS in a small office this is way too much.
Q. I am using Ubuntu Linux and I would like to know how to create alias for eth0 so that I can have multiple IP address?
A. To create alias for eth0 use ifconfig command. It is use to configure a network interface and aliases.
Assuming that your eth0 IP is 192.168.1.10 and you would like to create an alias eth0:0 with IP 192.168.1.11. Type the following command: