When installing a Windows Server 2012 server to replace an old Server 2008 I needed to access the Active Directory Schema Snap-in but it didn’t appear in the Microsoft Management Console list. It seems that the DLL for it isn’t registered with Windows so you need to do that first. You simply need to do
regsvr32 schmmgmt.dll > and then click
After you do that the option should appear in the Add or Remove Snap-ins list withing Microsoft Management Console.
Older versions of find don’t support the -newermt predicate, so you cannot use it. As a workaround, you could use the -newer predicate. That predicate needs a file as a reference: instead of an absolute modification date, it will use the modification date of the file. You can create appropriate “marker files” for this purpose, for example:
touch /tmp/mark.start -d "2013-12-19 00:00"
touch /tmp/mark.end -d "2013-12-16 00:00"
And then rewrite using -newer predicate:
find /some/path -newer /tmp/mark.start
To find between dates the exclamation is the equivalent of “not” so do this:
find /some/path -newer /tmp/mark.start ! -newer /tmp/mark.end
I had a problem getting connections to MySQL using TCP/IP over SSH working. I wanted to use a private key instead of saving a password for the SSH connection, but I kept getting an error message:
Authentication error. Please check that your username and password are correct and try again.
Details (Original exception message): Authentication failed, please check credentials.
Please refer to logs for details
The problem was that I was using a PPK file instead of an OpenSSH file. The solution is to open PuttyGen, load your PPK file and convert it to an OpenSSH key.
I was updating the Apache configuration on a new CentOS Linux server today and trying to update the tuning parameters such as MinSpareServers. No matter how many times I changed them and did
apachectl restart I couldn’t get them to take affect.
Eventually I remembered that changing these settings requires a stop & start, rather than just a restart!
apachectl stop; apachectl start
When I’m running commands with a lot of output via an SSH shell (I use Putty) I like to have a long buffer and scroll back through the output. However, if I’ve already run a lot of other commands then it’s difficult to see when the output of the last command started. I found a useful printf sequence that can be used to clear the buffer in Putty (can’t remember where I found it I’m afraid…).
Enter the script below:
clear && printf '\033[3J';
chmod +x ~/bin/clearandrun and you can now precede any command with
clearandrun to clear the screen and scrollback before running the command.
I wanted to install Percona Toolkit on a CentOS machine today but the download comes as an RPM. Percona make it easy to install it with Yum however by adding their repo. To do it do:
# rpm -Uhv http://www.percona.com/redir/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
# rpm -Uhv http://www.percona.com/redir/downloads/percona-release/percona-release-0.0-1.i386.rpm
and then you can simply do
# yum install percona-toolkit
We had a problem today on our Windows 2008 Server installation where most shares under a DFS namespace were accessible correctly, but all shares which were hosted on a physically different server, using DFS redirection, were unaccessible.
The message the client received was the typical message about being unable to access the share, please check with your system admin, etc., and then at the end said:
“The file cannot be accessed by the system.”
It turned out the solution was simply a case of restarting the DFS Namespace service on the server hosting the namespace. I don’t know why this happened but we had restarted the Windows server hosting DFS a few times recently due to hardware problems so I presume it somehow lost contact with the other server.
I had a problem today where the Mailbox Rights in Exchange for newly created users were showing only an entry for SELF and nothing else. After a bit of head scratching I eventually found via Google that this is normal until the user has logged in for the first time (either via Outlook Web Access or via normal Outlook) or the user has received an email. You can read more about it here:
In my case I simply logged on each user I needed to create via OWA to get the permissions set correctly, before adding the additional permissions that I needed.
I was wondering what filter=2 means when you see it in the query string on a page on Facebook. A quick search on Google didn’t turn anything up either which was annoying as I always feel that you should be able to find an answer to practically any well-worded question on Google!
In the interest of allowing Google to provide an answer to this question I am writing this post:
filter=1 means display only posts by the page
filter=2 means display only posts by others
filter=3 means display highlights (and is also the default if no filter is specified)
Hope that helps someone!
Have you ever wanted to put some kind of symbol on a page but didn’t want to have to resort to Photoshop to create an image for it? There are lots of Unicode symbols but trying to find the one you want can be very difficult. I found a really useful website called Shapecatcher which allows you to draw the symbol that you want and it will search for Unicode characters close to the shape you have drawn. Very handy, and it’s amazing some of the characters that exist in Unicode!