LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-13-2003, 07:29 AM   #1
friendklay
Member
 
Registered: Jan 2003
Posts: 36

Rep: Reputation: 15
Question Removing Root Password/Auto login


I am running my Redhat 8 box as a NAT server and to make in automatically login without entering passwords are user name.

I also want these lines(commands) to be executed automatically. Yes, I am a newbie, but please help.

ifconfig eth0:0 10.255.255.1 netmask 255.255.252.0
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1> /proc/sys/net/ipv4/ip_forward

Thank you all in advance.
 
Old 05-13-2003, 07:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
enter any startup commands you wish to run on to the end of /etc/rc.local. Not sure what you mean by a NAT server, as that is what those commands you list will do.

as for automatically logging in... don't.
 
Old 05-13-2003, 12:02 PM   #3
friendklay
Member
 
Registered: Jan 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
enter any startup commands you wish to run on to the end of /etc/rc.local. Not sure what you mean by a NAT server, as that is what those commands you list will do.

as for automatically logging in... don't.
Thank you. But I think I should state my problems more clearly. I live in an area where electricity black outs happens four or five times daily. And every time this happens someone has to login to the linux box and enter those commands. So I need the login process to be automatic as well, and allow five other computers to surf the net. Thank you for your rc.local advise, I would greatly appreciate if login could aslo be automated as well. Security is not at all an issue for me. Our ISP assigns us with private IPs, so I guess we are immune from internet based attacks (although perhaps not from other subscribers, and even then I don't mind if our linux box is being a 'honeypot' --- just to give kick to those who may otherwise be bored.) :-)

Hope to receive a solution.

PS: Your sign was very helpfull. I really love the "Rute Users' Tutorial and Exposition, .
 
Old 05-13-2003, 03:23 PM   #4
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Well if you want a passwordless root account (which I don't suggest) you need to change /etc/shadow. As an example:
Quote:
root:$1$eNq5hBUx$lTkmKii66qdLZwHz4QKBA/:12176:0:99999:7:::
Needs to be changed to:
Quote:
root::12176:0:99999:7:::
Again: I do not recommend that from a security point of view.

Well if you want to do it that way, all you need to enter at the login prompt is root (no password).
 
Old 05-13-2003, 03:47 PM   #5
friendklay
Member
 
Registered: Jan 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Well so far I have found two ways to do automatic login on a Redhat box. One is editing inittab, found here http://www.cs.man.ac.uk/~jtl/RH/index.html#AutoLogin

And the other is a graphical utitlity in Redhat 8. Its in Redhat Menu > System Settings > Login Screen. This opens the GDM setup GUI, and under the General tab there is Automatic Login. I think I will follow the GUI method. But can I do auotmatic login for root?
 
Old 05-13-2003, 04:02 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Quote:
Originally posted by friendklay
I live in an area where electricity black outs happens four or five times daily. And every time this happens someone has to login to the linux box and enter those commands.
1) Is there something wrong with buying a UPS? It would be mucher better for your PC.
2) acid_kewpie is right, just enter the commands to rc.local and then nobody will need the root login.
 
Old 05-13-2003, 04:10 PM   #7
friendklay
Member
 
Registered: Jan 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by david_ross
1) Is there something wrong with buying a UPS? It would be mucher better for your PC.
2) acid_kewpie is right, just enter the commands to rc.local and then nobody will need the root login.
I do have an UPS, but where I live it goes out for a couple of hours before coming back. (I live in Yangon, Myanmar). So it does depletes the back power supplies. I do understand that you were concerned, thanks.
 
Old 05-13-2003, 04:49 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Quote:
Originally posted by friendklay
I do have an UPS, but where I live it goes out for a couple of hours before coming back. (I live in Yangon, Myanmar). So it does depletes the back power supplies. I do understand that you were concerned, thanks.
Sorry, I didn't realise it was that bad - at least with powerchute installed you can minimise the risk of data loss.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-login (root account) sammykrupa Linux - Newbie 3 07-30-2005 11:27 PM
Auto login as root lmanwarren Fedora 2 04-10-2005 06:05 PM
auto login as root Whisky_Drinker Linux - Newbie 15 01-19-2005 04:20 PM
Auto login once as root... dano1970 Linux - General 2 10-28-2004 05:19 AM
Auto Login Root In Level 3 dezeque Linux - General 1 04-27-2004 08:25 PM


All times are GMT -5. The time now is 12:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration