LDAP : SambaMungedDial Syntax

Yohann Fourteau yohann.fourteau at aitb.org
Wed Dec 8 09:17:41 GMT 2004


Hi,

I've done some test to try to decode (and recode) the sambaMungedDial Attribute
in LDAP.

My attribute is (on one line) :
IAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC
AAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAUAAQABoACAAB
AEMAdAB4AEMAZgBnAFAAcgBlAHMAZQBuAHQANTUxZTBiYjAYAAgAAQBDAHQAeABDAGYAZw
BGAGwAYQBnAHMAMQAwMGUwMDAxMBYACAABAEMAdAB4AEMAYQBsAGwAYgBhAGMAawAwMDAw
MDAwMBIACAABAEMAdAB4AFMAaABhAGQAbwB3ADAxMDAwMDAwKAAIAAEAQwB0AHgATQBhAH
gAQwBvAG4AbgBlAGMAdABpAG8AbgBUAGkAbQBlADAwMDAwMDAwLgAIAAEAQwB0AHgATQBh
AHgARABpAHMAYwBvAG4AbgBlAGMAdABpAG8AbgBUAGkAbQBlADAwMDAwMDAwHAAIAAEAQw
B0AHgATQBhAHgASQBkAGwAZQBUAGkAbQBlADAwMDAwMDAwIgAIAAEAQwB0AHgASwBlAHkA
YgBvAGEAcgBkAEwAYQB5AG8AdQB0ADAwMDAwMDAwKgACAAEAQwB0AHgATQBpAG4ARQBuAG
MAcgB5AHAAdABpAG8AbgBMAGUAdgBlAGwAMDAgAAIAAQBDAHQAeABXAG8AcgBrAEQAaQBy
AGUAYwB0AG8AcgB5ADAwIAACAAEAQwB0AHgATgBXAEwAbwBnAG8AbgBTAGUAcgB2AGUAcg
AwMBgAJAABAEMAdAB4AFcARgBIAG8AbQBlAEQAaQByADVjNWM3MzYxNzQ3NTcyNmU2NTVj
NzAyZTYyNjk2NDZmNmUwMCIABgABAEMAdAB4AFcARgBIAG8AbQBlAEQAaQByAEQAcgBpAH
YAZQA1MDNhMDAgADoAAQBDAHQAeABXAEYAUAByAG8AZgBpAGwAZQBQAGEAdABoADVjNWM3
MzYxNzQ3NTcyNmU2NTVjNzA3MjZmNjY2OTZjNjU3NDczNjU1YzcwMmU2MjY5NjQ2ZjZlMD
AiAAIAAQBDAHQAeABJAG4AaQB0AGkAYQBsAFAAcgBvAGcAcgBhAG0AMDAiAAIAAQBDAHQA
eABDAGEAbABsAGIAYQBjAGsATgB1AG0AYgBlAHIAMDA=

In fact it's base64 encoded.
When I decode that, i find (on one line, it begins with lots of space
characters) :
----------------------------------------
                                               
CtxCfgPresent551e0bbCtxCfgFlags100e0001CtxCallback0000000CtxShadow01000000CtxMaxConnectionTime00000000CtxMaxDisconnectionTime0000000CtxMaxIdleTime00000000CtxKeyboardLayout00000000*CtxMinEncryptionLevel00
CtxWorkDirectory00
CtxNWLogonServer00$CtxWFHomeDir5c5c73617475726e655c702e6269646f6e00"CtxWFHomeDirDrive503a00
:CtxWFProfilePath5c5c73617475726e655c70726f66696c657473655c702e6269646f6e00"CtxInitialProgram00"CtxCallbackNumber00
-----------------------------------------

You have the value of each TSE fields :
CtxCfgPresent
CtxCfgFlags
CtxCallback
CtxShadow
CtxMaxConnectionTime
CtxMaxDisconnectionTime
CtxMaxIdleTime
CtxKeyboardLayout
CtxMinEncryptionLevel
CtxWorkDirectory
CtxNWLogonServer
CtxWFHomeDir
CtxWFHomeDirDrive
CtxWFProfilePath
CtxInitialProgram
CtxCallbackNumber


If you take the string variables like CtxWFHomeDir, you find :
5c5c73617475726e655c702e6269646f6e00"

I don't know what is the tailing double quote (if it belongs to the next field
or to the CtxWFHomeDir field) but 5c5c73617475726e655c702e6269646f6e00 is just
a string in hex format. If you use (in php) that function to decode :
function hexbin($hex){
   $bin='';
   for($i=0;$i<strlen($hex);$i+=2)
     $bin.=chr(hexdec(substr($hex,$i,2)));
   return $bin;
}
You find :
\\saturne\p.bidon

Which is the home dir I put in the usrmgr interface of my tse server.

Why not to try to decode and split that attribute in 16 other attributes in LDAP
?

Cordialy,
-- 
Yohann F.


More information about the samba-technical mailing list