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 agree with sycamorex, use the root account when necessary, no more, no less. You need to learn to use it and use it properly as it is absolutely necessary to perform certain tasks. It shouldn't, however, be used for every day stuff like a normal user account is. There are a couple of reasons for this. One, it is all too easy to make a mistake that is irrecoverable and wipes out your entire system. For example, if you want to delete a directory you can use the rm -rf command. If you accidentally enter this command from the wrong location or with the wrong parameters, you can erase your system binaries. If this happens and you are operating as a normal user, no harm no foul as the command won't execute. As root, though, you won't get a warning, you won't be asked if your sure, it will just happen. Second, if you are running certain application as root, such as a web browser and that browser becomes compromised the attacker will be executing with the privileges with which the browser is running: in this case root. The consequences of this would be disastrous and completely preventable.
For example, if you want to delete a directory you can use the rm -rf command. If you accidentally enter this command from the wrong location or with the wrong parameters, you can erase your system binaries. If this happens and you are operating as a normal user, no harm no foul as the command won't execute.
Hi i know this thread is solved, but i'd like to ask an additional question relevant to this. In reference to the post above, i was just wondering, if you've done a "su" and then launch a decremental command like the one above, will it fail or still execute?
To follow up on your line of thinking, there is the sudo command; sudo - super user do. It is often times and excellent alternative to running as the root user. If what you require is to run a command or two, sudo can be an easier, as well as safer approach. Some distributions like Ubuntu lock the root user account and rely on using sudo. To use it, you prefix the privileged command with sudo and you will be prompted for your password. In this case, it is the USER password. In order to enable it, you need to add the user to the sudoers list as well as specify the commands that are allowed. You should read the man files or other online documentation to learn more about how this works.
One other thing I should mention, if you run an SSH server, it is considered to be a very bad security risk to allow SSH capability directly into root. Instead you should always require SSH via a user account and then elevation to root. Amongst other things, root is about the most commonly attempted brute force attack on an ssh server. By turning this capability off, you will eliminate one of the biggest threats to an SSH server.