If the file /etc/nologin exists, login will allow access only to root. Other users will be shown the contents of this file and their logins will be refused.
Quote:
Steps to do:
1.Go to terminal login as sudo user inorder to create file in /etc.
lostwarrior@leo:~$ --usermode
|
OK:
~$ --usermode
bash: --usermode: command not found
I think you left something out...
Quote:
3.type touch nologin
Now the user cant able to enter into the machine.If he enters the username then the content from nologin file will get displayed
|
... hmmm, an empty file... niiice.
Hey! I'm locked out!
Quote:
4.NoteBefore doing this try to have the root password.Otherwise u cant enter into the root access.
|
Now he tells me!
How about just start with:
0. enable root login.
1. sudo nano /etc/nologin
Add text:
My Apologies;
This system has been locked for maintenance.
Anormal service will resume at 2300 hours.
--The MGT
Now you have a two-step howto, instead of 7.
BTW: Put "HOWTO" in the title next time.