Console not locking [INACTIVE]

To discuss and report ONLY Bugs

Console not locking

Mensagempor bobbb » Dom Jul 27, 2008 6:57 pm

I found an occasion when the console does not lock on logout.

Login root
Highlight exit and hit ENTER. Now I get the message to type menu and type ENTER
menu and ENTER gives me the menu system.
Select Logout (now Select is highlighted on the menu)
Hitting ENTER does not give me the login prompt. If I type exit then I get the Login prompt.

Of course if I use PuTTY then it works correctly ( it exits PuTTY ).
bobbb
 

Re: Console not locking

Mensagempor Bender » Seg Jul 28, 2008 8:29 am

Then logout of the menu only works the first time. If exit the menu and return does not work any longer.
Bender
 

Re: Console not locking

Mensagempor bobbb » Seg Jul 28, 2008 1:29 pm

I was wrong. I get the same results with PuTTY.
If exit the menu and return does not work any longer.
And I found that typing exit at the command line prompt does get you back to the login screen. So this is a work-around.

Is this a bug?
bobbb
 

Re: Console not locking

Mensagempor Claudio » Qui Jul 31, 2008 9:02 am

Yes and no.

This behavior comes since Coyote 2.10, when i added the "logout" command to the menu. It's a bug, but it's not a new bug.

This logout works only when you get the menu for the first time, just after the login.

When you exit this "first" menu, the system opens a new shell instance and when you type menu it opens another instance over the first (it's like a stack). If you try to use the logout command from inside this second instance it just returns to the first.

Try this:
On the console type the command sh, the system will open a second shell
then type sh again, the sysem will open a third shell
then use the exit command, it returns to the second
exit again, returns to the first
exit again, now it logout.

I do not know a command which close all shell instances and force the logout from inside the third one. If that command exists then we could use it and fix this.
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Re: Console not locking

Mensagempor bobbb » Qui Jul 31, 2008 4:49 pm

This behavior comes since Coyote 2.10, when i added the "logout"
And I had never noticed.

The experiment you describe with sh acts as in DOS, exit always gets back to the previous shell. Logical.

Then I guess we need to call this a feature. :)
bobbb
 

Re: Console not locking

Mensagempor eduardor » Qui Ago 21, 2008 12:47 am

This a very ofuscated feature 8-)

Simply call a shell a Quit menu

1) Edit -usr-sbin-menu at Q

Código: Selecionar todos
      q | Q)   echo
         echo "Exiting menu. To return to the menu, simply type \"exit\" and"
         echo "press enter from the command prompt."
         echo
         /bin/sh
         #break

Note: EXIT from shell and return to MENU !

2) And a L
Código: Selecionar todos
      l | L )   exit 1;

Note: exit 1 o break :roll:

3) Edit ~/.profile

Código: Selecionar todos
# ~/.profile: executed for shells.

export HOSTNAME=`hostname`
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export PS1="$HOSTNAME# "

umask 022

#Comment next both lines to skip menu
/usr/sbin/menu
exit

Exit for break or leave at shell

Call a menu from shell, nest a new menu.
Avoid this, renaming menu to menu.sh (and .profile), and leave a old menu with an echo advise "Type exit, not menu ;-)" or better exit too.

I test it remotelly only :roll:
eduardor
 


Voltar para Bug Reports

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 4 visitantes

cron