Ken Schneider wrote:
On Tue, 2005-06-14 at 10:34 -0400, Dana Jaeger wrote:
Hi,
Overview of what I want to do. Allow a user to log on to an account, automatically exuecute a script that will allow them to change there samba password and exit the script, the logout of the account. I do not want them to get a command line. I have done something like this in AIX successfully but I am not sure how to do it in Suse or Redhat.
I have a script and at the end of it I want to exit the shell (bash or ksh) then logoff the id. There is no logout command on the box. (Suse 8)
Script would be something like
trap "" 2 (commands) Allow entry of user id echo ... more ... ./smbpasswd $USRID exit
How can I go about doing this.
Add the lines to their .profile file with the last executed command being logout. The are many possibilities. The last place I worked at only gave login users a menu of choices and would not allow them to ^c to break out of the menu. As soon as they exited the menu they were logged off.
Hi Dana, if you don't want to do the above, try "exec exit" instead of just "exit". If the parent process is the login shell, that should do what you want. Martin