SET_PASE_SHELL_INFO procedure
The SET_PASE_SHELL_INFO procedure provides the ability to set the path to the PASE shell for the specified user or the path to the default shell returned for users that do not have a configured shell.
The path set by this procedure is returned in the pw_shell field in struct pw from PASE APIs such as Get User Information for User Name (getpwnam) and Get User Information for User ID (getpwuid). It is also returned by the QSYS2.USER_INFO view. If a user does not have a path set, the default shell path is returned; if the default shell is not set, an empty string is returned. The pw_shell field is used by PASE applications that need to execute shells for a user, such as the OpenSSH server. The OpenSSH server will start this application as the initial program when the user logs in. If it is not set it will use /QOpenSys/usr/bin/bsh instead.
- If AUTHORIZATION_NAME is *CURRENT or matches the caller of this procedure, no authorization is needed.
- Otherwise, the caller must have:
- *SECADM special authority, and
- *OBJMGT and *USE authorities to the user profile identified by AUTHORIZATION_NAME.
- authorization-name
- A character or graphic string expression that identifies an existing
user profile name. Can also be one of the following special values:
- *CURRENT
- Set the current user's shell.
- *DEFAULT
- Set the PASE shell to be used by any user that does not have an explicit value set. The default does not apply to IBM® supplied profiles.
- shell-path
- A character or graphic string expression that specifies the path to a PASE shell. The string must begin with a forward slash (/).
Examples
- Set the current user's shell to BASH shipped by 5733-OPS.
CALL QSYS2.SET_PASE_SHELL_INFO('*CURRENT', '/QOpenSys/QIBM/ProdData/OPS/tools/bin/bash');
- Set the default shell to be ksh for any
users that do not have an explicit shell set.
CALL QSYS2.SET_PASE_SHELL_INFO('*DEFAULT', '/QOpenSys/usr/bin/ksh');