Modifying an initrd

Posted on .

Extract

Recreate

Elevated/Admin Notepad++ Context Menu

Posted on .

I use NotePad++ on Windows and sometimes it is a little frustrating when UAC gets in the way of my editing some files. I have to manually load NotePad++ as Administrator, and try again.

This INF file will install an extra context menu called “Edit with NotePad++ (elevated)”.
notepad_elevated_context_menu

Once downloaded, right click the file and choose Install.

Note: The install script assumes NotePad++ is at “C:\Program Files (x86)\Notepad++\notepad++.exe”. You can adjust the location in the install script by editing the very last line.

Download
  NotepadppElevated.inf (1.3 KiB, 4,380 hits)

(tested on Windows 7 x64)

Logoff Disconnected Users From Remote Desktop via batch-file

Posted on .

I would like to log-off some users after they have disconnected. Windows has this feature built-in, you can find it at the user-properties “Sessions” tab.

However I have found this feature to be unreliable. Whether it is set to log-off disconnected users at 1 minute or 5 minutes, during isolated tests it works fine, but when in production it has failed multiple times in the last few months with disconnected sessions lingering for hours before noticed.

I found this command-line code to log-off all disconnected users. It seemed to fit the purpose. It uses “quser” to get the list of logged on users, writes them to a file, finds the ones that are disconnected and uses “rwinsta” to log them off. Pretty neat.

I felt I could improve on it though. I saw it didn’t really need to write to a temporary file, and just use internal variables. I also wanted it to connect to multiple servers and be able to list specific users to be logged off.

This can then be added to an elevated scheduled task that runs every X minutes to check for disconnected users.

This is working for Windows Server 2008 R2 and Windows Server 2012.

Disconnect listed users:
(adjust the list of servers and users)

Disconnect all users:
(adjust the list of servers)

Teamspeak 3 – Server Admin Query privilege key

Posted on .

In order to add a user as “Server Admin Query”, login via telnet as “serveradmin” and get a privilege token with the following command:

You will need to select which virtualserver the token should be generated with first with use sid=[server id].

Example:

XoloMiner Linux Install Script

Posted on .

I’ve written an install script for Xolo’s PrimeCoin Pool Miner XoloMiner on my new favourite coin, PrimeCoin (XPM).

This makes the miner ready to use at beeeeer.org, or any other pool that supports XoloMiner.

This is still a work in progress, but the install script itself is complete. So far it has been created only for Debian Wheezy as this is the distro I have been using.

$ ./xolominer

Usage: ./xolominer {start|stop|restart|force-reload|status|install|uninstall}

This script will do the following:

  • Install pre-requisites
  • Compile from latest GitHub source
  • Add user/group
  • Init script
  • Log to /var/log/xolominer
  • Crontab entries for auto-restart and log rotate
  • Set to run at boot
  • Uses /etc/xolominer/xolominer.conf as list of pools to loop through (failover)
  • Command “status” for pool and chains per day rate (can be used in Nagios/Zabbix)
  • Command “uninstall” to remove all files except config at /etc/xolominer

I made this as I have access to a few Debian machines and wanted to be able to quickly and easily install the miner without having to perform it all manually. I also needed a reason to code some more bash 🙂

I actually have similar scripts for installing cpuminer, cgminer and bfgminer but this script has been tested the most and is worthy of public attention, enjoy 🙂

Updated 2014-05-12
Updated build method
Renamed to XoloMiner

Note: When updating, uninstall old version and copy /etc/primeminer/primeminer.conf to /etc/xolominer/xolominer.conf

Download
  xolominer.sh (13.3 KiB, 1,883 hits)

Download (old version)
  primeminer.sh (12.3 KiB, 2,092 hits)

Happy mining!

How to use:
wget -q https://nooblet.org/blog/download/xolominer.sh;
chmod +x xolominer.sh;
sudo ./xolominer.sh install;

Installer output:
primeminer_install
Uninstaller output:
primeminer_uninstall