public static void SetLocalUserPassword(string userName, string password)
{
if ((object)userName == null)
throw new ArgumentNullException(nameof(userName));
if ((object)password == null)
throw new ArgumentNullException(nameof(password));
// Remove any irrelevant white space
userName = userName.Trim();
if (userName.Length == 0)
throw new ArgumentException("Cannot set password for local user: no user name was specified.", nameof(userName));
if (Common.IsPosixEnvironment)
UnixUserInfo.SetLocalUserPassword(userName, password);
WindowsUserInfo.SetLocalUserPassword(userName, password);
}