The getshell() function retrieves the default login shell of the specified user. This information is obtained from the shell field of /etc/passwd or the NIS password map.

result = getshell([user]);
user Optional. The name of the user for which shell information should be retrieved. If the user is not specified, then the value of the runuser variable is used.

A string that contains the default login shell for the specified user from the shell field of /etc/password or the password NIS map. If the username is not found or is invalid, then the policy is rejected with an error code.

result = getshell("JSmith");

In this example, the default shell information for the account JSmith is returned in result. For example, /bin/sh.