I found my problem. RHEDS uses SSHA whereas Google uses SHA-1, not the same
thing. I ended up hashing and storing the password as SHA-1 so that I have
it later when I create the Google account.
On Wednesday, May 2, 2012 3:04:07 PM UTC-5, Chris Heath wrote:
> I am trying to create an account using a hashed password instead of a
> plaintext password. I am pulling the sha-1 hash value out of a RH
> Enterprise Directory Server. Problem is that I can't get the syntax quite
> right. I have tried every variation I can think of. Here is some test
> code I tried and all 48 cases failed. Anybody have any ideas?
> {
> MultiDomainManagementService mdms = GoogleHelper.GetMDMS("
> example.edu");
> AppsExtendedEntry eUser;
> string sDomain = "southalabama.edu", sMail = "[email protected]
> ";
> string[] asPasswords = new string[] {
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA" };
> string[] asHashFuncs = new string[] { "SHA-1", "SHA1", "SSHA",
> "sha-1", "sha1", "ssha", "{SHA-1}", "{SHA1}", "{SSHA}", "{sha-1}",
> "{sha1}", "{ssha}" };
> int iFails = 0;
> bool bDoBreak = false;
> foreach (string sPassword in asPasswords)
> {
> foreach (string sHashFunc in asHashFuncs)
> {
> try
> {
> eUser = mdms.CreateDomainUser(sDomain, sMail,
> sPassword, sHashFunc,
> "firstName", "LastName", false);
>
> //eUser = mdms.CreateDomainUser(sDomain, sMail,
> // sPassword,
> // "firstName","LastName",false);
> Master.NoteText("this worked: sPassword=|" + sPassword
> + "|, HashFunc=|" + sHashFunc + "|");
> bDoBreak = true;
> break;
> }
> catch
> {
> iFails++;
> }
> }
> if (bDoBreak)
> break;
> }
> Master.NoteText("fails=" + iFails.ToString());
> }
>
>
>
>
On Wednesday, May 2, 2012 3:04:07 PM UTC-5, Chris Heath wrote:
>
> I am trying to create an account using a hashed password instead of a
> plaintext password. I am pulling the sha-1 hash value out of a RH
> Enterprise Directory Server. Problem is that I can't get the syntax quite
> right. I have tried every variation I can think of. Here is some test
> code I tried and all 48 cases failed. Anybody have any ideas?
> {
> MultiDomainManagementService mdms = GoogleHelper.GetMDMS("
> example.edu");
> AppsExtendedEntry eUser;
> string sDomain = "southalabama.edu", sMail = "[email protected]
> ";
> string[] asPasswords = new string[] {
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA" };
> string[] asHashFuncs = new string[] { "SHA-1", "SHA1", "SSHA",
> "sha-1", "sha1", "ssha", "{SHA-1}", "{SHA1}", "{SSHA}", "{sha-1}",
> "{sha1}", "{ssha}" };
> int iFails = 0;
> bool bDoBreak = false;
> foreach (string sPassword in asPasswords)
> {
> foreach (string sHashFunc in asHashFuncs)
> {
> try
> {
> eUser = mdms.CreateDomainUser(sDomain, sMail,
> sPassword, sHashFunc,
> "firstName", "LastName", false);
>
> //eUser = mdms.CreateDomainUser(sDomain, sMail,
> // sPassword,
> // "firstName","LastName",false);
> Master.NoteText("this worked: sPassword=|" + sPassword
> + "|, HashFunc=|" + sHashFunc + "|");
> bDoBreak = true;
> break;
> }
> catch
> {
> iFails++;
> }
> }
> if (bDoBreak)
> break;
> }
> Master.NoteText("fails=" + iFails.ToString());
> }
>
>
>
>
On Wednesday, May 2, 2012 3:04:07 PM UTC-5, Chris Heath wrote:
>
> I am trying to create an account using a hashed password instead of a
> plaintext password. I am pulling the sha-1 hash value out of a RH
> Enterprise Directory Server. Problem is that I can't get the syntax quite
> right. I have tried every variation I can think of. Here is some test
> code I tried and all 48 cases failed. Anybody have any ideas?
> {
> MultiDomainManagementService mdms = GoogleHelper.GetMDMS("
> example.edu");
> AppsExtendedEntry eUser;
> string sDomain = "southalabama.edu", sMail = "[email protected]
> ";
> string[] asPasswords = new string[] {
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA" };
> string[] asHashFuncs = new string[] { "SHA-1", "SHA1", "SSHA",
> "sha-1", "sha1", "ssha", "{SHA-1}", "{SHA1}", "{SSHA}", "{sha-1}",
> "{sha1}", "{ssha}" };
> int iFails = 0;
> bool bDoBreak = false;
> foreach (string sPassword in asPasswords)
> {
> foreach (string sHashFunc in asHashFuncs)
> {
> try
> {
> eUser = mdms.CreateDomainUser(sDomain, sMail,
> sPassword, sHashFunc,
> "firstName", "LastName", false);
>
> //eUser = mdms.CreateDomainUser(sDomain, sMail,
> // sPassword,
> // "firstName","LastName",false);
> Master.NoteText("this worked: sPassword=|" + sPassword
> + "|, HashFunc=|" + sHashFunc + "|");
> bDoBreak = true;
> break;
> }
> catch
> {
> iFails++;
> }
> }
> if (bDoBreak)
> break;
> }
> Master.NoteText("fails=" + iFails.ToString());
> }
>
>
>
>
On Wednesday, May 2, 2012 3:04:07 PM UTC-5, Chris Heath wrote:
>
> I am trying to create an account using a hashed password instead of a
> plaintext password. I am pulling the sha-1 hash value out of a RH
> Enterprise Directory Server. Problem is that I can't get the syntax quite
> right. I have tried every variation I can think of. Here is some test
> code I tried and all 48 cases failed. Anybody have any ideas?
> {
> MultiDomainManagementService mdms = GoogleHelper.GetMDMS("
> example.edu");
> AppsExtendedEntry eUser;
> string sDomain = "southalabama.edu", sMail = "[email protected]
> ";
> string[] asPasswords = new string[] {
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA" };
> string[] asHashFuncs = new string[] { "SHA-1", "SHA1", "SSHA",
> "sha-1", "sha1", "ssha", "{SHA-1}", "{SHA1}", "{SSHA}", "{sha-1}",
> "{sha1}", "{ssha}" };
> int iFails = 0;
> bool bDoBreak = false;
> foreach (string sPassword in asPasswords)
> {
> foreach (string sHashFunc in asHashFuncs)
> {
> try
> {
> eUser = mdms.CreateDomainUser(sDomain, sMail,
> sPassword, sHashFunc,
> "firstName", "LastName", false);
>
> //eUser = mdms.CreateDomainUser(sDomain, sMail,
> // sPassword,
> // "firstName","LastName",false);
> Master.NoteText("this worked: sPassword=|" + sPassword
> + "|, HashFunc=|" + sHashFunc + "|");
> bDoBreak = true;
> break;
> }
> catch
> {
> iFails++;
> }
> }
> if (bDoBreak)
> break;
> }
> Master.NoteText("fails=" + iFails.ToString());
> }
>
>
>
>
On Wednesday, May 2, 2012 3:04:07 PM UTC-5, Chris Heath wrote:
>
> I am trying to create an account using a hashed password instead of a
> plaintext password. I am pulling the sha-1 hash value out of a RH
> Enterprise Directory Server. Problem is that I can't get the syntax quite
> right. I have tried every variation I can think of. Here is some test
> code I tried and all 48 cases failed. Anybody have any ideas?
> {
> MultiDomainManagementService mdms = GoogleHelper.GetMDMS("
> example.edu");
> AppsExtendedEntry eUser;
> string sDomain = "southalabama.edu", sMail = "[email protected]
> ";
> string[] asPasswords = new string[] {
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA==",
> "{SSHA}2bX8XF9kC0kDIMdlYBDxhZmu624E29SDmTY7CA" };
> string[] asHashFuncs = new string[] { "SHA-1", "SHA1", "SSHA",
> "sha-1", "sha1", "ssha", "{SHA-1}", "{SHA1}", "{SSHA}", "{sha-1}",
> "{sha1}", "{ssha}" };
> int iFails = 0;
> bool bDoBreak = false;
> foreach (string sPassword in asPasswords)
> {
> foreach (string sHashFunc in asHashFuncs)
> {
> try
> {
> eUser = mdms.CreateDomainUser(sDomain, sMail,
> sPassword, sHashFunc,
> "firstName", "LastName", false);
>
> //eUser = mdms.CreateDomainUser(sDomain, sMail,
> // sPassword,
> // "firstName","LastName",false);
> Master.NoteText("this worked: sPassword=|" + sPassword
> + "|, HashFunc=|" + sHashFunc + "|");
> bDoBreak = true;
> break;
> }
> catch
> {
> iFails++;
> }
> }
> if (bDoBreak)
> break;
> }
> Master.NoteText("fails=" + iFails.ToString());
> }
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/jmuZWGc2I94J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.