#!/bin/bash # setrid by RVJ Callanan 03-Feb-2009 # sets next RID that Samba PDC will use # warning: rdb may change between samba versions rdb="/var/cache/samba/winbindd_idmap.tdb" hexrid=`printf "%08X" "$1"` hex3=${hexrid:0:2} hex2=${hexrid:2:2} hex1=${hexrid:4:2} hex0=${hexrid:6:2} tdbtool $rdb store RID_COUNTER\\0 "\\$hex0\\$hex1\\$hex2\\$hex3" exit