Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am a Linux learner. Could someone let me know what does this mean:
1. In /etc/services.. the portnumber for nameserver is 42, but for DNS, it is 53. what is the basic difference between these two and where it is applied.?
2. Everybody says logging in as root will lead to outsiders hacking your system, so we should run only as a nonroot user...could someone let me know a simple example how someone could log in to your system while running as root?
1. The nameserver sits and listens for requests; if it cannot resolve the name it will contact a Domain Name Server. Not all computers run a DNS.
2. Not true - logging in as root will not lead to outsiders hacking your system (unless you do things to encourage it). However, it is an extremely bad idea to log in as root except for the short periods that you need to do some admin work. Even then, people are usually logged in as a normal user and switch to root via 'su', then exit the root shell as soon as they can. Making mistakes as 'root' is often lethal to the computer system.
I think there are two main reasons for not making it a habit to log in as root for non-administrative work.
1. It's good for security to run all programs with the least level of privilege possible. If all you are doing is sending private email, or editing a document, the programs you use to do this do not need root privileges. Any program running on your computer might contain some bug which could be exploited to compromise the security of the system.
If a program running as as un-privileged user is compromised, the attacker can mess up that user's files and do other mischief on the system, but they should not be able to do something really horrible, like installing a root kit, formatting your hard disk and so on. On the other hand, if a program which is running as root is compromised, the attacker can do a lot more nasty things.
For this reason, the general rule is - only run programs of root that absolutely must run as root. For example, updates to system software can only be done by the root user, so the software update tool simply cannot be run without root privileges.
This is especially the case when running a graphical environment, simply because logging into a graphic environment starts a lot of software. Such software doesn't get the same security scrutiny as the comparatively small number of administration tools which need root privileges. Also, one very common program people are running in a graphical environment is a web browser, which is a very high risk program, just because of the nature of what it does. I think that you should never run a web browser as root.
2. A mistake executed by root can hose your whole system, forcing you to restore your system from backups or re-install from scratch. A mistake done by a non-privileged user generally won't be able to hose the whole system.
Given these two reasons, and that most modern Linux distros make it easy to temporarily escalate privileges for running administrative tasks (using sudo and it's graphical front ends in gnome and KDE), there should be no reason for logging in (to a graphical environment) as root.