
:star:Please star this project if you find it useful!
PassCore is a very simple 1-page web application written in C#, using ASP.NET Core , Angular Material, Typescript, and Microsoft Directory Services (Default provider). It allows users to change their Active Directory password on their own, provided the user is not disabled.
PassCore does not require any configuration, as it obtains the principal context from the current domain. I wrote this because a number of people have requested several features that the original version did not have. The original version of this tool was downloaded around 8000 times in 2.5 years. My hope is that the new version continues to be just as popular. There really is no free alternative out there (that I know of) so hopefully this saves someone else some time and money.
PassCore has the following features:

You can easily install using Powershell. Check the next section to know how.
dotnet publish --configuration Release --runtime win-x64 --output "<path>"<path> is the directory where you will be serving the website from.logs is not there you can created. To enable the logs you need to change stdoutLogEnabled to true in the web.config file. You need to add Full Control permissions to your IIS Application Pool account (see Troubleshooting).https://password.yourdomain.com (the host name you previously set). If all is set then you should be able to see the PassCore tool show up in your browser.NOTE: If you have a previous version, you can not use the same appsettings.json file. Please update your settings manually editing the new file.
Use PowerShell to download and setup Passcore using the following command line, just make sure you have installed the .NET Core 2.1 Windows Server Hosting bundle and enabled World Wide Web publishing service:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/unosquare/passcore/master/Installer.ps1'))
Using the command shown above will install to the folder C:\passcore and using the HTTP Port 8080 with the default (localhost) binding.
If you want to customize your installation please download the installer script and the IIS setup script.
NOTE: You need PowerShell version 5 or better to execute the script.
You can use the Alpine Docker Builder image and then copy the assets over to an Alpine container. You can pass environment attributes directly into docker without modifying the appsettings.json
docker build --rm -t passcore .
docker run \
-e AppSettings__LdapHostnames__0='ad001.example.com' \
-e AppSettings__LdapHostnames__1='ad002.example.com' \
-e AppSettings__LdapPort='636' \
-e AppSettings__LdapUsername='CN=First Last,OU=Users,DC=example,DC=com' \
-it \
-p 80:80 \
passcore:latest
NOTE: Docker image contains a build using the LDAP Provider (see below).
PassCore was created to use the Microsoft Active Directory Services provided by .NET Framework, but a new Provider using Novell LDAP Client can be used instead. This provider is the default when PassCore is running at Linux or MacOS since Microsoft AD Services are NOT available.
The configuration of the LDAP Provider is slightly different. for example, the AutomaticContext is not available and you need to supply credentials.
WIP
All server-side settings and client-side settings are stored in the /appsettings.json file.
The most relevant configuration entries are shown below. Make sure you make your changes to the appsettings.json file using a regular text editor like Visual Studio Code
PrivateKey entry and enter your private key within double quotes (")SiteKey entry and enter your Site Key within double quotes (")LanguageCode entry and enter one of the options listed here. By default this is set to enShowPasswordMeter entry and set it to true or false (without quotes)CheckRestrictedAdGroups entry and set it to true (without quotes)RestrictedADGroups entry and add any groups that are sensitive. Accounts in these groups (directly or inherited) will not be able to change their password.DefaultDomain entry and set it to your default Active Directory domain. This should eliminate confusion about using e-mail domains / internal domain names. NOTE: if you are using a subdomain, and you have errors, please try using your top-level domain. Thank you.http://mypasscore.com/?userName=someusernameIdTypeForUser it is possible to select one of six Attributes that will be used to search for the specifiv user.DistinguishedName or DNGloballyUniqueIdentifier or GUIDNameSamAccountName or SAMSecurityIdentifier or SIDUserPrincipalName or UPNTo run as a sub application you need to modify the base href="/" value in the wwwroot/index.html file to be the base url for PassCore. For example you might have PassCore setup at /PassCore so you would put
<base href="/PassCore/" />
icacls "<logfolder>/" /grant "IIS AppPool\<passcoreAppPoolAccount>:M" /t
PasswordChangeOptions in the /appsettings.json file. Here are some guidelines:
UseAutomaticContext is set to falseLdapUsername is set to an AD user with enough permissions to reset user passwordsLdapPassword is set to the correct password for the admin user mentioned abovedomain\\ or @domain. Only the username.If you need to modify the source code (either backend or frontend). You may require to install [.NET Core SDK}(https://dotnet.microsoft.com/download) and Node.js. Run the following command according to your target platform.
dotnet publish --configuration Release --runtime win-x64 --output "<path>"
dotnet publish --configuration Release --runtime linux-x64 /p:PASSCORE_PROVIDER=LDAP --output "<path>"
dotnet publish --configuration Release --runtime osx-x64 /p:PASSCORE_PROVIDER=LDAP --output "<path>"
Note - The PASSCORE_PROVIDER modifier will use the LDAP Provider instead of Active Directory Provider.
If you wish to create your own provider, you need use our interface and common classes. You can use the following nuget to install them:
PM> Install-Package Unosquare.PassCore.Common
PassCore is open source software and MIT licensed. Please star this project if you like it.
Content type
Image
Digest
Size
74.7 MB
Last updated
over 7 years ago
docker pull ptlange/passcore