Add a bat or cmd file to the windows 7 taskbar

This thread nearly answers my problem, another thread worth reading that solves these issues in a different way is here:

the best other way is this: I was able to add a batchfile to the taskbar by the following steps:

1. Renaming your .cmd/.bat to to .exe
2. right click on the *.exe and choose pin to taskbar
3. rename it back to .cmd/.bat
4. shift+right click the taskbar icon (for the exe) and choose properties
5. Change the reference from *.exe to .cmd/.bat and change icon as needed
6. It starts working right away but the icon refresh needs a reboot..


1. Create shortcut to your batch file
2. Get into shortcut property and change target to something like that: cmd.exe /C “path-to-your-batch”
3. Simply drag your new shortcut into a taskbar, it should be now pinnable

Cygwin crontab backups

A list of useful pages relating to cron and backup scripts:

Virtualmin Postfix Queue Error

If you receive this error in Webmin / Postfix:

/usr/bin/postqueue -p failed : sh: /usr/bin/postqueue: No such file or directory

The easiest solution is to find the postqueue file and make a synlink. postqueue is usually stored in /usr/sbin

Command to fix:

cd /usr/bin
ln -s /usr/sbin/postqueue postqueue

SMTPS Client for Linux and Synology NAS

A nice application called NAIL can be used to provide authenticated email transmission to your ISPs SMTP mail server.

Install using:
ipkg install nail

Edit the file:
vi /opt/etc/nail.rc

and add the following lines:

set smtp=smtp://
set from=”
set smtp-auth-password=password
set smtp-use-starttls
set ssl-verify=ignore

Save the file an run a test:

echo “my message” | /opt/bin/nail -v -s “test”

Dynamic DNS Updates with DHCP on Windows 2008 Server

To get the dhcp server to dynamically update the DNS records whenever an ip is issued to the following things:

  • Open DHCP Manager, right click the IPv4 Properties, goto the DNS Tab and set:
    • Enable DNS dynamic updates….
    • Always dynamically update DNS A and PTR records
    • Check Dynamically update DNS A and PTR records for DHCP clients that do not request updates….
  • Then goto the Advanced tab, hit the Credentials button and provide a valid username and password

This particularly applies to clients that are using the DHCP server and are not registered members of the domain

See Which Groups Your Linux User Belongs To

When you are using a linux system, itโ€™s useful to find out what groups you belong to, so you can understand whether you have access to files and directories. This is one of the simplest commands possible. This command should work on most varieties of linux.

groups [username]

Telling find to ignore a directory

Quite simple:

find / -follow -path ‘/path/to/ignore’ -prune -o -name -print

Enable SFTP on Synology NAS

To enable SFTP you have to SSH into your Synology as root and edit the following file using vi.

This sshd_config file should be located here ‘/etc/ssh/sshd_config’.

If it isn’t type ‘find / -type f -name ‘sshd_config’ -print’

Make the file look like this

# override default of no subsystems
#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp internal-sftp -f DAEMON -l VERBOSE
#Subsystem sftp /usr/syno/sbin/sftp-server -l DEBUG3

Reboot and done!

Virtualmin Mailman for multiple virtual domains

There is a known issue with mailman that you cannot have two lists with the same name i.e.


CPanel has a solution to this issue and i’d like to implement it in virtualmin.

CPanel will create the mailman lists with the listnames:

however CPanel will set the mail aliases correctly. as,

Looking at the following virtualmin-mailman config page: The add mailing list section requests a listname i.e. “test” and a domain name i.e.””

In the file, /usr/libexec/webmin/virtualmin-mailman/add.cgi I see no reason why the two parameters above can’t be combined to form a new hybrid list name “”

…some work later and viola an attachment below that provides all of the modifications required to make the problem disappear.

If you run a diff against the original file, you will notice the actual changes are minimal.
There are more comments and commented out debug lines than anything else!

This topic was posted as a discussion on the Virtualmin forum by me:

Cygwin / vim / rxvt arrow key problems

On my new machine I installed cygwin, the great set of unix tools for win32, (BTW this is what makes using a win32 machine acceptable IMHO, it just works like a unix box…) and as usual in vi (or vim) my arrow keys pop me out of insert mode and then insert a newline and ‘A’ ‘B’ ‘C’ or ‘D’ – very annoying.

So the search started…. and I remembered the simple solution from the last time. People say in this situation that it is your terminal, and not vim that is misconfigured. I’m not sure I believe that, because the fix includes vim.

All you need to do is modify your .vimrc file. Copy the example .vimrc file from /usr/share/vim/vim62/vimrc_example.vim to ~/.vimrc then open vi and its fixed ๐Ÿ™‚