Developers notebook

Category: Software (page 1 of 8)

NetDISCO Active Directory Authentication


base: 'OU=Accounts,DC=domain,DC=com'
proxy_user: 'LDAP_BIND_USER'
proxy_pass: 'LDAP_BIND_PASSWORD'
user_string: 'DOMAIN_HERE\%USER%'
debug: 0

Join Ubuntu Mate 16.04 to an MS Active Directory Domain

Bash script to prepare an Ubuntu Mate 16.04 host for joining to a MS Active Directory Domain.

Send a program to run in the background and close shell

disown -h


Pull files from a remote server over ssh with sudo privilege escalation

rsync -a -e “ssh” –bwlimit=10000 –rsync-path=”sudo rsync” remoteuser@remoteserver:/remotepath .

Original source:

UNIX timestamp and Active Directory timestamp for given date and time

/** Returns UNIX timestamp and Active Directory timestamp for given date and time */


//Format dd-mm-yyyy
$dateFromForm = '24-05-2020';

//Format hh:mm:ss
$timeFromForm = "00:00:00";

$CLI = 1;
if ($CLI = 0) { $LF = "<br>";} else {$LF = "\r\n";}
$dateWithTime = $dateFromForm." ".$timeFromForm;

function convertDateToUnix($input) {
$format = 'd-m-Y H:i:s';
$date = DateTime::createFromFormat($format, $input);
$UNIXTimestamp = $date->getTimestamp();
return $UNIXTimestamp;

function convertUnixtoWin($input) {
return ($input+11644473600)*10000000;

echo "*** Welcome to the Timestamp converter ***".$LF;
echo $LF."You entered: ".$dateWithTime.$LF;
echo $LF."UNIX Timestamp is ".$UNIX.$LF;
echo $LF."Windows Timestamp is ".convertUnixtoWin($UNIX).$LF;
echo $LF."**************************************".$LF;

NTLM error on openSUSE 13.2

When setting up NTLM on openSUSE I was getting a 500 server error from Apache.

In the error log: ntlm_auth reports Broken Helper: BH NT_STATUS_ACCESS_DENIED NT_STATUS_ACCESS_DENIED

Solved with setfacl -m u:wwwrun:rx /var/lib/samba/winbindd_privileged

Windows Update error 80244022

My PC wasn’t getting it’s updates from our on site Windows update server.  Follow these steps to get the updates directly from Microsoft.  This worked for me on Windows 8, should be good for Windows 7 too.

1. Open registry editor (Start menu –> Run –> regedit)

2. Find the following path HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU

3. Change the value of the UseWUServer from 1 to 0 (double click on it, change the value and click OK)

4. Restart Windows Update service (Start menu –> Run –> services.msc –> find the Windows Update service and click on Restart)

You may find group policy sets it back next time they are applied

Orignal source

Run command after boot SuSE

Append a command to the end of file /etc/init.d/boot.local to be executed after booting.

echo “command” >> /etc/init.d/boot.local

Example: echo "/opt/zend/bin/ start" >> /etc/init.d/boot.local

Original source:

MySQL restart OpenSuSe

I’ve always used /etc/init.d/mysql restart  to restart MySQL on SuSe Linux.  In OpenSuSe 13.2 this script has disapeared.

The new command is rcmysql restart

MySQL Error Number: 1118 Row size too large (> 8126)

During testing of a web form I’m developing that has some lengthy input fields, I hit the upper size limit for the VARCHAR field type.  Looking for a suitable alternative I found.

BLOB, TEXT (64 Kilobytes)

I went for TEXT which seemed more than big enough.  However when you have multiple large fields being submitted together MySQL may still error.  To overcome this.  Edit /etc/my.cnf under the [MySQL] section add :

innodb_file_format = Barracuda

Restart MySQL for the change to take effect /etc/init.d/mysql restart

Then update your table to use the compressed row format, setting the block size to 8.

ALTER TABLE appraisal
Older posts

© 2017

Theme by Anders NorenUp ↑