Saturday 19 July 2014

How to change the root login shell In Red Hat

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 /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 clients 
     Setups:-
    1 Open the /etc/passwd file with vim editor or other i m using vim.
    syntax:- vim /etc/passwd
     2 Now press i for insert mode in vim editor.Now change the shell /bin/bash into /sbin/nologin
    Now save the file in vim we use 
  • press ESC and the :wq  for Save

My friend test it on ssh thats proof 

  • this proof by DeadManINDIA :P from IHT 
     Jai Hind Jai Bharat 

0 comments:

Post a Comment