Fix ldap alternateintname

Main issue was the missing !

Also replacing uniqueid with rand for better readability. It is just needed to make sure it is unique and there will not be many duplicates (with default settings none at all). 

Please review @karlitschek @kabum or others