exit logout shell

exit logout shell

am 12.11.2007 22:02:02 von pinoy2ser

Hello All,

How will i be able to make the option exit of a menu also logs
out the user from the system?

This way the user will not be able to access the shell prompt at
all...

Thanks n advance...
pinoy.....

Re: exit logout shell

am 13.11.2007 00:39:59 von Janis Papanagnou

pinoy2ser wrote:
> Hello All,
>
> How will i be able to make the option exit of a menu also logs
> out the user from the system?
>
> This way the user will not be able to access the shell prompt at
> all...

Invoke the program that contains the menu on startup, e.g. in the users
file '$HOME/.profile', by calling 'exec menuprog' instead of 'menuprog'.

Or define in /etc/passwd the menu-program instead of the login-shell for
that user.

Janis

>
> Thanks n advance...
> pinoy.....
>

Re: exit logout shell

am 14.11.2007 16:06:44 von pinoy2ser

On Nov 12, 6:39 pm, Janis Papanagnou
wrote:
> pinoy2ser wrote:
> > Hello All,
>
> > How will i be able to make the option exit of a menu also logs
> > out the user from the system?
>
> > This way the user will not be able to access the shell prompt at
> > all...
>
> Invoke the program that contains the menu on startup, e.g. in the users
> file '$HOME/.profile', by calling 'exec menuprog' instead of 'menuprog'.
>
> Or define in /etc/passwd the menu-program instead of the login-shell for
> that user.
>
> Janis
>
>
>
>
>
> > Thanks n advance...
> > pinoy.....- Hide quoted text -
>
> - Show quoted text -

thanks for the advice..

Actually i found a way around this task..

in the $HOME/.profile i inserted this...

exec programs

exit

I added the exit command so when the user picks the "exit" from the
menu it also logs them out completely out of the system..

Re: exit logout shell

am 14.11.2007 20:39:31 von Janis Papanagnou

pinoy2ser wrote:
> On Nov 12, 6:39 pm, Janis Papanagnou
> wrote:
>
>>pinoy2ser wrote:
>>
>>>Hello All,
>>
>>> How will i be able to make the option exit of a menu also logs
>>>out the user from the system?
>>
>>>This way the user will not be able to access the shell prompt at
>>>all...
>>
>>Invoke the program that contains the menu on startup, e.g. in the users
>>file '$HOME/.profile', by calling 'exec menuprog' instead of 'menuprog'.
>>
>>Or define in /etc/passwd the menu-program instead of the login-shell for
>>that user.
>>
>>Janis
>>
>>
>>
>>
>>
>>
>>>Thanks n advance...
>>>pinoy.....- Hide quoted text -
>>
>>- Show quoted text -
>
>
> thanks for the advice..
>
> Actually i found a way around this task..
>
> in the $HOME/.profile i inserted this...
>
> exec programs
>
> exit
>
> I added the exit command so when the user picks the "exit" from the
> menu it also logs them out completely out of the system..
>

On my system the exit is not required if you _exec_ your menu-program.

Janis