Custom logins

Sometimes you are providing password-protected content to people outside of the USD community. You can create your own list of usernames and passwords for such pages.

Instead of “require_once('/web/includes/sso_portal.phpi')” use “require_once('/web/includes/sso_custom.phpi')”.

User file

You must have a file of usernames and passwords. This file is the same format as the files htpasswd creates; if you have such a file, you can use it.

<? require_once('/web/includes/sso_custom.phpi'); $sso->users('/path/to/users.txt'); $sso->authenticate(); ?>

Like your group file (if you have one), this should not be in a public place. Create a special folder in your home directory to store files such as this.

SSO scope

By default, the scope of the single sign-on environment is limited to the directory that this file is in. If you need it to have a wider scope, specify the scope with $sso->scope('/path/to/parent/') before you authenticate. For example:

<? require_once('/web/includes/sso_custom.phpi'); $sso->users('/Users/webac/web/users.txt'); $sso->scope('/webdev/'); $sso->authenticate(); ?>


Your user file can also contain an e-mail address as a third field. Note that the htpasswd command will erase any data beyond two fields per entry, so don’t use htpasswd once you add an e-mail address.

If you add an e-mail address, this will be returned by the $sso->email() method.


The easiest way to create a password to a file is with:

/usr/local/bin/webpassword --file <filename> <username> [<email address>]

For example:

/usr/local/bin/webpassword --file users.txt jerry

It will ask you for the password to store in the file.

Use /usr/local/bin/webpassword --help for more options. After you change a password, you should test it on your web pages.

If your web page is on, you cannot use sso_custom. You must use sso_www. If you need the functionality of sso_custom, send an email to the webmaster describing how you intend to use it.