public override void OnActivate(string attributeName, string attributeData) { passwordData = null; PasswordDialog pd = new PasswordDialog(); if (pd.UnixPassword == null) { return; } switch (attributeName.ToLower()) { case "userpassword": passwordData = pd.UnixPassword; break; case "sambalmpassword": passwordData = pd.LMPassword; break; case "sambantpassword": passwordData = pd.NTPassword; break; default: break; } }
public void OnSetPasswordClicked(object o, EventArgs args) { PasswordDialog pd = new PasswordDialog(); if (!passwordEntry.Text.Equals("") && pd.UnixPassword.Equals("")) { return; } passwordEntry.Text = pd.UnixPassword; smbLM = pd.LMPassword; smbNT = pd.NTPassword; }
public void OnPasswordClicked(object o, EventArgs args) { PasswordDialog pd = new PasswordDialog(); if (pd.UnixPassword.Equals("")) { return; } pass = pd.UnixPassword; smbLM = pd.LMPassword; smbNT = pd.NTPassword; passChanged = true; }
void ChangePassword(LdapEntry entry, PasswordDialog pd) { List <LdapModification> mods = new List <LdapModification> (); LdapAttribute la; LdapModification lm; la = new LdapAttribute("userPassword", pd.UnixPassword); lm = new LdapModification(LdapModification.REPLACE, la); mods.Add(lm); if (Util.CheckSamba(entry)) { la = new LdapAttribute("sambaLMPassword", pd.LMPassword); lm = new LdapModification(LdapModification.REPLACE, la); mods.Add(lm); la = new LdapAttribute("sambaNTPassword", pd.NTPassword); lm = new LdapModification(LdapModification.REPLACE, la); mods.Add(lm); } Util.ModifyEntry(conn, entry.DN, mods.ToArray()); }
void OnPwdActivate(object o, EventArgs args) { PasswordDialog pd = new PasswordDialog(); if (pd.UserResponse == ResponseType.Cancel) { return; } if (pd.UnixPassword == null || pd.UnixPassword == "") { return; } TreeModel model; TreePath[] tp = this.Selection.GetSelectedRows(out model); foreach (TreePath path in tp) { LdapEntry le = conn.Data.GetEntry(GetDN(path)); ChangePassword(le, pd); } }
void OnPwdActivate(object o, EventArgs args) { PasswordDialog pd = new PasswordDialog (); if (pd.UserResponse == ResponseType.Cancel) return; if (pd.UnixPassword == null || pd.UnixPassword == "") return; TreeModel model; TreePath[] tp = this.Selection.GetSelectedRows (out model); foreach (TreePath path in tp) { LdapEntry le = conn.Data.GetEntry (GetDN(path)); ChangePassword (le, pd); } }
void ChangePassword(LdapEntry entry, PasswordDialog pd) { List<LdapModification> mods = new List<LdapModification> (); LdapAttribute la; LdapModification lm; la = new LdapAttribute ("userPassword", pd.UnixPassword); lm = new LdapModification (LdapModification.REPLACE, la); mods.Add (lm); if (Util.CheckSamba (entry)) { la = new LdapAttribute ("sambaLMPassword", pd.LMPassword); lm = new LdapModification (LdapModification.REPLACE, la); mods.Add (lm); la = new LdapAttribute ("sambaNTPassword", pd.NTPassword); lm = new LdapModification (LdapModification.REPLACE, la); mods.Add (lm); } Util.ModifyEntry (conn, entry.DN, mods.ToArray()); }
public void OnPasswordClicked(object o, EventArgs args) { PasswordDialog pd = new PasswordDialog (); if (pd.UnixPassword.Equals ("")) return; pass = pd.UnixPassword; smbLM = pd.LMPassword; smbNT = pd.NTPassword; passChanged = true; }
public override void OnActivate(string attributeName, string attributeData) { passwordData = null; PasswordDialog pd = new PasswordDialog (); if (pd.UnixPassword == null) return; switch (attributeName.ToLower()) { case "userpassword": passwordData = pd.UnixPassword; break; case "sambalmpassword": passwordData = pd.LMPassword; break; case "sambantpassword": passwordData = pd.NTPassword; break; default: break; } }
public void OnSetPasswordClicked(object o, EventArgs args) { PasswordDialog pd = new PasswordDialog (); if (!passwordEntry.Text.Equals ("") && pd.UnixPassword.Equals ("")) return; passwordEntry.Text = pd.UnixPassword; smbLM = pd.LMPassword; smbNT = pd.NTPassword; }