Para impedir usuários efetuarem logon em um sistema Linux basta criar o arquivo nologin em \etc, assim somente o usuário root poderá efetuar login.
Ex:
root@debian:~# touch /etc/nologin
root@debian:~# login
debian login: maykon
Login incorrect
debian login:
------------------
Não obetive sucesso ao tenta efetuar login com o usuário maykon, só depois de remover o arquivo nologin que foi possível o acesso.
root@debian:~# rm /etc/nologin
root@debian:~# login
debian login: maykon
Password:
Last login: Fri Mar 16 13:33:41 BRT 2012 on pts/0
Linux debian 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
maykon@debian:~$
Ex:
root@debian:~# touch /etc/nologin
root@debian:~# login
debian login: maykon
Login incorrect
debian login:
------------------
Não obetive sucesso ao tenta efetuar login com o usuário maykon, só depois de remover o arquivo nologin que foi possível o acesso.
root@debian:~# rm /etc/nologin
root@debian:~# login
debian login: maykon
Password:
Last login: Fri Mar 16 13:33:41 BRT 2012 on pts/0
Linux debian 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
maykon@debian:~$