Use sp_maplogin to map logins:
sp_maplogin (authentication_mech | null), (client_username | null), (action | login_name | null)
Where:
authentication_mech – is one of the valid values specified for authenticate with option in sp_modifylogin.
client_username – is an external user name, which can be an operating system name, a user name for an LDAP server, or anything else the PAM library understands. A null value indicates that any login name is valid.
action – indicates create login or drop. When you use create login the login is created as soon as is is authenticated. Use drop to remove logins.
login_name is an Adaptive Server login that already exists in syslogins.
This example maps external user “jsmith” to the Adaptive Server user “guest.” Once authenticated, “jsmith” has the privileges of “guest.” The audit login record shows both the client_username and the Adaptive Server user name:
sp_maplogin NULL, "jsmith", "guest"
This example tells Adaptive Server to create a new login for all external users authenticated with LDAP, if a login does not already exist:
sp_maplogin LDAP, NULL, "create login"
Copyright © 2005. Sybase Inc. All rights reserved. |