Greetings all,
I'm in the midst of writing a login component for a series of shell scripts. What my login script does is this:
- Prompt for username and read in username
- Prompt for destination host and read in destination host
- run ssh username and destination host
- After user keys in password and verification is complete, the login script checks his username against a file and looks up his level of access rights (indicated by a number). The script then launches either a.sh (for superusers) or b.sh (for standard users) depending on his access rights.
I'm just wondering whether I can make use of the sudoers file to achieve step 4 instead of keeping an extra file on the system to store user priority records since it would appear that both files serve a similar function.
If it is possible to make use of the sudoer file to determine a given user's access rights and launch him/her into one of the shell scripts accordingly, how can this be achieved?
Thanks in advance