C# Class GSF.Identity.UnixUserInfo

Inheritance: IUserInfo
Show file Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
AddUserToLocalGroup ( string groupName, string userName ) : bool
AuthenticateUser ( string domain, string userName, string password, string &errorMessage ) : IPrincipal
ChangePassword ( string oldPassword, string newPassword ) : void
CreateLocalGroup ( string groupName ) : bool
CreateLocalUser ( string userName, string password, string userDescription ) : bool
Dispose ( ) : void
GetBuiltInLocalGroups ( ) : string[]
GetLocalGroupUserList ( string groupName ) : string[]
GetUserPropertyValue ( string propertyName ) : string
GetUserPropertyValueCollection ( string propertyName ) : string[]
GroupNameToSID ( string groupName ) : string
ImpersonateUser ( string domain, string userName, string password ) : System.Security.Principal.WindowsImpersonationContext
Initialize ( ) : bool
IsGroupSID ( string sid ) : bool
IsUserSID ( string sid ) : bool
LocalGroupExists ( string groupName ) : bool
LocalUserExists ( string userName ) : bool
RemoveLocalGroup ( string groupName ) : bool
RemoveLocalUser ( string userName ) : bool
RemoveUserFromLocalGroup ( string groupName, string userName ) : bool
SIDToAccountName ( string sid ) : string
SetLocalUserPassword ( string userName, string password ) : void
UnixUserInfo ( UserInfo parent ) : System
UserIsInLocalGroup ( string groupName, string userName ) : bool
UserNameToSID ( string userName ) : string

Private Methods

Method Description
AttemptAnonymousBinding ( UnixIdentity unixIdentity ) : UnixIdentity
AuthenticateUser ( string userName, string password ) : int
ChangeUserPassword ( string userName, string oldPassword, string newPassword ) : int
CountStrings ( IntPtr stringArray ) : int
DecodeAccountName ( string accountName ) : string
Dispose ( bool disposing ) : void
EncodeAccountName ( string accountName ) : string
FreeLocalGroupMembers ( IntPtr groupMembers ) : void
GetCachedLocalUserPasswordInformation ( string userName, UserPasswordInformation &userPasswordInfo, AccountStatus &accountStatus ) : int
GetLdapHost ( ) : string
GetLocalGroupID ( string groupName, uint &groupID ) : int
GetLocalGroupMembers ( string groupName, IntPtr &groupMembers ) : int
GetLocalGroupName ( uint uid, StringBuilder groupName ) : int
GetLocalGroupUserSet ( string groupName ) : HashSet
GetLocalUserGecos ( string userName ) : IntPtr
GetLocalUserGroupCount ( string userName ) : int
GetLocalUserGroupIDs ( string userName, int groupCount, uint &groupsIDs ) : int
GetLocalUserGroups ( string userName ) : string[]
GetLocalUserID ( string userName, uint &userID ) : int
GetLocalUserName ( uint uid, StringBuilder userName ) : int
GetLocalUserPasswordInformation ( string userName, UserPasswordInformation &userPasswordInfo, AccountStatus &accountStatus ) : int
GetLocalUserPasswordInformation32 ( string userName, UserPasswordInformation32 &userPasswordInfo, AccountStatus &status ) : int
GetLocalUserPasswordInformation64 ( string userName, UserPasswordInformation &userPasswordInfo, AccountStatus &status ) : int
GetLocalUserPasswordInformationMac ( string userName, int &lastChangeDate, int &maxDaysForChange, int &accountExpirationDate ) : int
GetPAMErrorMessage ( int responseCode ) : string
GetPasswordHash ( string password, string salt ) : IntPtr
GetRandomSalt ( ) : string
GetUnixIdentity ( ) : UnixIdentity
ParseDNTokens ( string dn, string token, char delimiter = '.' ) : string
PtrToString ( IntPtr p ) : string
PtrToStringArray ( IntPtr stringArray ) : string[]
PtrToStringArray ( int count, IntPtr stringArray ) : string[]
SetLocalUserPassword ( string userName, string password, string salt ) : int
TryExtractAccountID ( string sid, uint &accountID ) : bool
UnixUserInfo ( ) : System
ValidateAccountName ( string accountName ) : string

Method Details

AddUserToLocalGroup() public static method

public static AddUserToLocalGroup ( string groupName, string userName ) : bool
groupName string
userName string
return bool

AuthenticateUser() public static method

public static AuthenticateUser ( string domain, string userName, string password, string &errorMessage ) : IPrincipal
domain string
userName string
password string
errorMessage string
return IPrincipal

ChangePassword() public method

public ChangePassword ( string oldPassword, string newPassword ) : void
oldPassword string
newPassword string
return void

CreateLocalGroup() public static method

public static CreateLocalGroup ( string groupName ) : bool
groupName string
return bool

CreateLocalUser() public static method

public static CreateLocalUser ( string userName, string password, string userDescription ) : bool
userName string
password string
userDescription string
return bool

Dispose() public method

public Dispose ( ) : void
return void

GetBuiltInLocalGroups() public static method

public static GetBuiltInLocalGroups ( ) : string[]
return string[]

GetLocalGroupUserList() public static method

public static GetLocalGroupUserList ( string groupName ) : string[]
groupName string
return string[]

GetUserPropertyValue() public method

public GetUserPropertyValue ( string propertyName ) : string
propertyName string
return string

GetUserPropertyValueCollection() public method

public GetUserPropertyValueCollection ( string propertyName ) : string[]
propertyName string
return string[]

GroupNameToSID() public static method

public static GroupNameToSID ( string groupName ) : string
groupName string
return string

ImpersonateUser() public static method

public static ImpersonateUser ( string domain, string userName, string password ) : System.Security.Principal.WindowsImpersonationContext
domain string
userName string
password string
return System.Security.Principal.WindowsImpersonationContext

Initialize() public method

public Initialize ( ) : bool
return bool

IsGroupSID() public static method

public static IsGroupSID ( string sid ) : bool
sid string
return bool

IsUserSID() public static method

public static IsUserSID ( string sid ) : bool
sid string
return bool

LocalGroupExists() public static method

public static LocalGroupExists ( string groupName ) : bool
groupName string
return bool

LocalUserExists() public static method

public static LocalUserExists ( string userName ) : bool
userName string
return bool

RemoveLocalGroup() public static method

public static RemoveLocalGroup ( string groupName ) : bool
groupName string
return bool

RemoveLocalUser() public static method

public static RemoveLocalUser ( string userName ) : bool
userName string
return bool

RemoveUserFromLocalGroup() public static method

public static RemoveUserFromLocalGroup ( string groupName, string userName ) : bool
groupName string
userName string
return bool

SIDToAccountName() public static method

public static SIDToAccountName ( string sid ) : string
sid string
return string

SetLocalUserPassword() public static method

public static SetLocalUserPassword ( string userName, string password ) : void
userName string
password string
return void

UnixUserInfo() public method

public UnixUserInfo ( UserInfo parent ) : System
parent UserInfo
return System

UserIsInLocalGroup() public static method

public static UserIsInLocalGroup ( string groupName, string userName ) : bool
groupName string
userName string
return bool

UserNameToSID() public static method

public static UserNameToSID ( string userName ) : string
userName string
return string