Rest of machine password code
This commit is contained in:
parent
4c921ab280
commit
e6a920676d
@ -310,6 +310,7 @@ namespace EduNetworkBuilder
|
|||||||
public static int UntaggedVLAN = -1; //If the packet is not tagged.
|
public static int UntaggedVLAN = -1; //If the packet is not tagged.
|
||||||
public static int MaxPacketsBeforeOptimizing = 50;
|
public static int MaxPacketsBeforeOptimizing = 50;
|
||||||
public static int DefaultPasswordLen = 6;
|
public static int DefaultPasswordLen = 6;
|
||||||
|
public static int DefaultMachinePasswordLen = 20;
|
||||||
public static int DefaultSaltLen = 50;
|
public static int DefaultSaltLen = 50;
|
||||||
|
|
||||||
public static string AllowedPasswordCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!~@#$%^&*()_+{}[]/?<>,.";
|
public static string AllowedPasswordCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!~@#$%^&*()_+{}[]/?<>,.";
|
||||||
|
@ -200,6 +200,7 @@ namespace EduNetworkBuilder
|
|||||||
writer.WriteElementString("PasswordHint", PasswordHint);
|
writer.WriteElementString("PasswordHint", PasswordHint);
|
||||||
if(isAdmin) //only admins have students, so they are the only ones who need to store this path
|
if(isAdmin) //only admins have students, so they are the only ones who need to store this path
|
||||||
writer.WriteElementString("StudentFilePath", StudentFilePath);
|
writer.WriteElementString("StudentFilePath", StudentFilePath);
|
||||||
|
if (AltPassword == "") AltPassword = TrippleDESDocumentEncryption.GenMachinePW(NB.GetRandom());
|
||||||
writer.WriteElementString("AltPassword", AltPassword);
|
writer.WriteElementString("AltPassword", AltPassword);
|
||||||
writer.WriteElementString("IsAdmin", isAdmin.ToString());
|
writer.WriteElementString("IsAdmin", isAdmin.ToString());
|
||||||
writer.WriteElementString("ChangePasswordAtLogin", ChangePassAtFirstLogin.ToString());
|
writer.WriteElementString("ChangePasswordAtLogin", ChangePassAtFirstLogin.ToString());
|
||||||
|
Loading…
Reference in New Issue
Block a user