LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 07-21-2008, 03:12 AM   #1
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
pls help me find the answer..


hello,
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?

Thanks a lot..pls excuse if questions are silly.
 
Old 07-21-2008, 04:00 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
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.
 
Old 07-21-2008, 07:14 PM   #3
FranDango
Member
 
Registered: Jun 2008
Posts: 101

Rep: Reputation: 15
Most brute force attempts to break into your system with root privileges will fail if your system is set to not allow external root logins.

In such a case you login under some other valid username, and then 'su' to root privileges.

Another security measure is to move SSH access from the regular port 22 to some other port number. Brute force attacks often do target port 22 only.

Linux Archive

Last edited by FranDango; 09-20-2008 at 07:05 AM.
 
Old 07-21-2008, 07:52 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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.
 
Old 07-22-2008, 01:02 AM   #5
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
pinniped,FranDango..Thank you for your info. Matthewg42, your post cleared my doubts..thanks a lot for all of your time..
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Most Stupid Question Ever... Cant find answer... lonecrow Linux - Newbie 21 01-07-2007 08:48 PM
find and replace answer word? matarodi Linux - General 0 10-27-2005 02:51 PM
Pls help i can't get an ANSWER from DNS elopee Linux - Networking 1 09-18-2005 05:39 AM
samba question, i cant find the answer ross8425 Linux - Networking 7 10-03-2004 02:54 PM
pls answer it carefully farhan Linux - General 5 02-14-2003 08:13 PM


All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration