Month: May 2014
-
How to reset a user password in Windows without knowing the original password
Today we were asked how to reset a Windows user password (in this case the administrator account for a Windows Home Server 2011 install) without knowing the original password. The user had a logged-in Administrator session but had typo’d their password twice successfully during the install and was not keen on reinstalling then repeating…
-
Postfix basic example – how to send an email from the command line
If you have a system with a working Postfix install (in this case, it’s likely that it was configured during install) and you want to send an email from the command line, you can do so with the following: mail -s “subject” [email protected] email content goes here . Type in the first…
-
Debian Wheezy: /etc/sudoers missing
If you’re looking to add something to the /etc/sudoers file in a Debian Wheezy install, you may find that the file isn’t there! To create the file while logged in as the root user you need to install the sudo package: apt-get install sudo Once that install completes the file will appear:…
-
Awk: Remove everything after the first word in each line
Another awk question. How to remove everything after the first word in each line? E.g., if we wanted to remove everything but the names in this input (FILENAME.txt): Anna 123 09123 Main Street Bob 109 09800 Smith Street Joe 0981 123123 King Street We can use awk like so: awk ‘{…
-
Awk: Remove first line of file
Short and sweet – when piping data through awk, how do we remove the first line of the input? awk ‘{if (NR!=1) {print}}’ e.g. cat FILENAME.txt | awk ‘{if (NR!=1) {print}}’ Done!