Jai Hind Friends I am Deepak Saini here today we will disscus on the root log in shell.
Lets Start :-
No login Shell :- To prevent users from logging in directly as root, the system administrator can set the root account's shell to
Disabling the Root Shell
Effectes :-
Dose not Affect :-
Lets Start :-
No login Shell :- To prevent users from logging in directly as root, the system administrator can set the root account's shell to
/sbin/nologin
in the /etc/passwd
file.
Disabling the Root Shell
Effectes :-
Prevents access to the root shell and logs any such
attempts. The following programs are prevented from accessing the root
account:
login
gdm
kdm
xdm
su
ssh
scp
sftp
Dose not Affect :-
Programs that do not require a shell, such as FTP clients,
mail clients, and many setuid programs. The following programs are not prevented from accessing the root account:
sudo
- FTP clients
- Email clientsSetups:-1 Open the /etc/passwd file with vim editor or other i m using vim.syntax:- vim /etc/passwd2 Now press i for insert mode in vim editor.Now change the shell /bin/bash into /sbin/nologinNow save the file in vim we use
- press ESC and the :wq for Save
My friend test it on ssh thats proof
0 comments:
Post a Comment