Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jun 2, 2023. It is now read-only.
/passcorePublic archive

A self-service password management tool for Active Directory

License

NotificationsYou must be signed in to change notification settings

unosquare/passcore

Repository files navigation

Github All ReleasesBuils status

Passcore Logo

PassCore: A self-service password change utility for Active Directory

⭐ Please star this project if you find it useful!

Overview

PassCore is a very simple 1-page web application written inC#, usingASP.NET Core,Material UI (React Components), andMicrosoft Directory Services (Default provider).

It allows users to change their Active Directory/LDAP 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 theoriginal 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.

You can checkthe wiki section for additional content related to development of this project.

Features

PassCore has the following features:

  • Easily localizable (i.e. you can customize all of the strings in the UI -- see the section on Customization)

  • SupportsreCAPTCHA

  • Has a built-in password meter

  • Has a password generator

  • Has a server-side password entropy meter

  • Responsive design that works on mobiles, tablets, and desktops.

  • Works with Windows/Linux servers.

Installation on IIS

You can easily install using Powershell. Check the next section to know how.

  1. Ensure the server running IIS is domain-joined. To determine if the computer is domain-joined:
    • Go to theStart menu, right-click onComputer, then selectProperties
    • Make sure theDomain field contains the correct setting.
  2. You need a Passcore copy to continue. We recommend to download the latest binary release ofPassCore.
  3. NOTE: Before extracting the contents of the file, please right-click on it, select Properties and make sure the file is Unblocked (Click on the Unblock button at the bottom of the dialog if it is available). Then, extract the contents of the zip file to the directory where you will be serving the website from.
    • If you download the source code you need to run the following command via an Command Prompt. Make sure you start the Command Prompt with the Administrator option.
    • dotnet publish --configuration Release --runtime win-x64 --output "<path>"
    • The<path> is the directory where you will be serving the website from.
  4. Install the.NET Core 5.0.1 Windows Server Hosting bundle.
  5. Go to yourIIS Manager, Right-click onApplication Pools and selectAdd Application Pool.
  6. A dialog appears. Under Name enterPassCore Application Pool, Under .NET CLR Version selectNo Managed Code and finally, under Managed pipeline mode selectIntegrated. Click OK after all fields have been set.
  7. Now, right-click on the application pool you just created in the previous step and selectAdvanced Settings .... Change theStart Mode toAlwaysRunning, and theIdle Time-out (minutes) to0. Click onOK. This will ensure PassCore stays responsive even after long periods of inactivity.
  8. Back on yourIIS Manager, right-click onSites and selectAdd Website
  9. A dialog appears. UnderSite name, enterPassCore Website. UnderApplication pool click onSelect and ensure you selectPassCore Application Pool. UnderPhysical path, click on the ellipsis(...), navigate to the folder where you extracted PassCore.
    • Important: Make sure the Physical path points to theparent folder which is the one containing the files,logs andwwwroot folders.
    • NOTE: If the folderlogs is not there you can created. To enable the logs you need to changestdoutLogEnabled totrue in theweb.config file. You need to addFull Control permissions to your IIS Application Pool account (see Troubleshooting).
  10. Under theBinding section of the same dialog, configure theType to behttps, setIP Address toAll Unassigned, thePort to443 and theHostname to something likepassword.yourdomain.com. UnderSSL Certificate select a certificate that matches the Hostname you provided above. If you don't know how to install a certificate, please refer toSSL Certificate Install on IIS 8 orSSL Certificate Install on IIS 10 , in order to install a proper certificate.
    • Important: Do not serve this website without an SSL certificate because requests and responses will be transmitted in cleartext and an attacker could easily retrieve these messages and collect usernames and passwords.
  11. ClickOK and navigate tohttps://password.yourdomain.com (the hostname 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, youcan not use the sameappsettings.json file. Please update your settings manually editing the new file.

PowerShell Installer

Use PowerShell to download and setup Passcore using the following command line, just make sure you have installed the.NET Core 5.0.1 Windows Server Hosting bundle and enabled World Wide Web publishing service:

Set-ExecutionPolicy Bypass-ScopeProcess-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 folderC:\passcore and using the HTTP Port 8080 with the default (localhost) binding.

If you want to customize your installation please download theinstaller script andtheIIS setup script.

NOTE: You needPowerShell version 5 or betterto execute the script.

Linux

We recommend use the docker image and redirect the traffic to nginx.

Docker

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).

LDAP Provider

PassCore was created to use the Microsoft Active Directory Services provided by .NET Framework, but a new Provider usingNovell 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

Pwned Password Support

Sometimes a simple set of checks and some custom logic is enough to rule out non-secure trivial passwords. Those checks are always performed locally. There are, however, many more unsafe passwords that cannot be ruled out programatically. For those cases there are no simple set of rules that could be used to check those passwords that should never be used: You either need a local DB with a list of banned passwords or use an external API service.

Here is where Pwned Password API comes into play. Pwned Passwords are more than half a billion passwords which have previously been exposed in different data breaches along the years. The use of this service is free and secure. You can read more about this service inPwned Passwords overview

Customization and Configuration

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 theappsettings.json file using a regular text editor likeVisual Studio Code

  • To enable reCAPTCHA
    1. Find thePrivateKey entry and enter your private key within double quotes (")
    2. Find theSiteKey entry and enter your Site Key within double quotes (")
  • To change the language of the reCAPTCHA widget
  • To enable/disable the password meter
    • Find theShowPasswordMeter entry and set it totrue orfalse (without quotes)
  • To enable enable/disable the password generator
    • Find theUsePasswordGeneration entry and set it totrue orfalse (without quotes)
    • Find thePasswordEntropy entry and set it to a numeric value (without quotes) to set the entropy of the generated password
  • To enable server-side password entropy meter
    • Find theMinimumScore entry and set it to a numeric value (without quotes) between 1 and 4, where 1 is a bit secure and 4 is the most secure. Set to 0, for deactivate the validation.
  • To enable restricted group checking
    1. Find theRestrictedADGroups entry and add any groups that are sensitive. Accounts in these groups (directly or inherited) will not be able to change their password.
  • Find theDefaultDomain 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.
  • To provide an optional parameter to the URL to set the username text box automatically
    1. http://mypasscore.com/?userName=someusername
    2. This helps the user in case they forgot their username and, also comes in handy when sending a link to the application or having it embedded into another application where the user is already signed in.
  • To specify which (DC) attribute is used to search for the specific user.
    • With theIdTypeForUser it is possible to select one of six Attributes that will be used to search for the specifiv user.
    • The possible values are:
      • DistinguishedName orDN
      • GloballyUniqueIdentifier orGUID
      • Name
      • SamAccountName orSAM
      • SecurityIdentifier orSID
      • UserPrincipalName orUPN
  • The rest of the configuration entries are all pretty much all UI strings. Change them to localize, or to brand this utility, to meet your needs.

Running as a sub-application

To run as a sub-application you need to modify thebase href="/" value in thewwwroot/index.html file to be the base URL for PassCore. For example you might have PassCore setup at /PassCore so you would put

<basehref="/PassCore/"/>

Troubleshooting

  • At first run if you find an error (e.g.HTTP Error 502.5) first ensure you have installed.NET Core 3.1.0 Windows Server Hosting bundle, or better.
  • If you find anHTTP Error 500 you can try
    1. Press Win Key+R to Open Run Window
    2. in the Run Window, enter "OptionalFeatures.exe"
    3. in the features window, Click: "Internet Information Services"
    4. Click: "World Wide Web Services"
    5. Click: "Application Development Features"
    6. Check the features.
  • If you / your user's current password never seems to be accepted for reset; the affected person may need to use a domain-connected PC to log in and reset their password on it first. Updated group policy settings could be blocking user changes, until a local login is completed.
  • You can add permissions to your log folder usingicacls
icacls "<logfolder>/" /grant "IIS AppPool\<passcoreAppPoolAccount>:M" /t

LDAP Support

  • If your users are having trouble changing passwords as in issues #8 or #9 : try configuring the sectionPasswordChangeOptions in the/appsettings.json file. Here are some guidelines:
    1. EnsureUseAutomaticContext is set tofalse
    2. EnsureLdapUsername is set to an AD user with enough permissions to reset user passwords
    3. EnsureLdapPassword is set to the correct password for the admin user mentioned above
    4. User @gadams65 suggests the following: Use the FQDN of your LDAP host. Enter the LDAP username without any other prefix or suffix such asdomain\\ or@domain. Only the username.
  • You can also opt to use the Linux or macOS version of PassCore. This version includes a LDAP Provider based on Novell. The same provider can be used with Windows, you must build it by yourself.

License

PassCore is open source software and MIT licensed. Please star this project if you like it.

passcorepro

PassCore is free and will continue to be free forever.However, you can access a complete, brand new version with new features and tools.

Introducing passcorepro.This new, enhanced version of our self-service password manager comes with new features such as:

  • Display and manage your Active Directory information with our user profile system.
  • Search for any staff member with the new Directory grid.
  • Forgot your password? We help you reset it via Email or SMS (viaTwillio Verify API or custom SMS Gateway).
  • Administrate your AD using our new Dashboard tool.
  • Parlez-vous français? You can now add any language to PassCorePro!

Go to our store and download a free trial:https://store.unosquare.com/PasscorePro


[8]ページ先頭

©2009-2025 Movatter.jp