LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Removing Root Password/Auto login (https://www.linuxquestions.org/questions/linux-general-1/removing-root-password-auto-login-59545/)

friendklay 05-13-2003 07:29 AM

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.

acid_kewpie 05-13-2003 07:43 AM

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.

friendklay 05-13-2003 12:02 PM

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, :).

markus1982 05-13-2003 03:23 PM

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).

friendklay 05-13-2003 03:47 PM

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?

david_ross 05-13-2003 04:02 PM

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.

friendklay 05-13-2003 04:10 PM

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.

david_ross 05-13-2003 04:49 PM

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.


All times are GMT -5. The time now is 01:05 AM.