nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Allowing root login in RHEL 4

This is a discussion on Allowing root login in RHEL 4 within the Linux software forums, part of the Linux Getting Started category; Hi to All, I want to allow root login thru telnet in my PC. This is just used to do ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 09-07-2006, 12:52 PM
Member
User
 
Join Date: Jul 2005
Posts: 85
Rep Power: 0
ricc
Default Allowing root login in RHEL 4

Hi to All,

I want to allow root login thru telnet in my PC. This is just used to do testing and learning. So there is no worry of security being compromised. I just dont seem to find it.

I am sure we can allow root logins thru telnet.


ricc
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-07-2006, 02:18 PM
Member
User
 
Join Date: Jul 2005
Posts: 85
Rep Power: 0
ricc
Default

Sorry,

After posting here, I Googled and found that what I was doing was right.

I knew that inserting an entry for pts/1 ........... to pts/n into the file /etc/securetty will allow root login.

But the mistake I did was that I just inserted only one line, pts/1, from an xterm. Unfortunately, when I tried to telnet to localhost, it used to get pts/2 or pts/3 and it used to fail. And I thought something else will have to be enabled.

After Googling, I realised that this is the only way and I immediately put in entries for more pts....and it worked.

ricc
Reply With Quote
  #3 (permalink)  
Old 09-10-2006, 07:08 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

It is also importat to note that you need to modify /etc/pam.d/login pam config file. Remove line auth required pam_securetty.so and you should be able to login as root user over ssh.

Code:
vi /etc/pam.d/login
Comment it out (or remove0 following line
Code:
#auth       required     pam_securetty.so
Once you save these changes, you should be able to telnet to your system as the root user

Here is my sample file:
Code:
#auth       required     pam_securetty.so
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
session    optional     pam_console.so
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #4 (permalink)  
Old 09-12-2006, 04:28 PM
Member
User
 
Join Date: Jun 2005
Posts: 45
Rep Power: 0
warren
Default

don't forget to restart xinetd after editing /etc/pam.d/login
another method is to remove securetty
ex:
-bash-3.00# rm -f /etc/securetty
-bash-3.00# /etc/init.d/xinetd restart

root can now login thru telnet. securetty will just be created after reboot.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
RHEL ES4 wont login sentar Linux software 2 01-30-2008 03:21 AM
dovecot: pop3-login: pop3-login: error while loading shared libraries: libsepol.so.1 raj Mail Servers 1 11-15-2007 11:43 AM
Block Single User Login using root password sayan4u86 Networking, Firewalls and Security 0 09-28-2007 07:47 AM
howto enable kde root login asim.mcp Linux software 1 09-07-2006 05:26 AM
Recovering redhat LINUX (RHEL) root password raj Linux software 3 07-14-2006 06:02 PM


All times are GMT +5.5. The time now is 11:03 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36