Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm a happy newbie user of openSuSE 10. At the moment, I'm presently logging on as root whenever I install software (probably not necessary with YaST, but oh well).
Is this a recommended practice, or should I be installing software as my user account? My personal account doesn't have access to many system folders so I assume this is the way to go.
Anything that is packaged can go through YaST -- Is it still worthwhile to log in as root? Is there any risk to doing so?
Distribution: anything debian based, long live apt-get
Posts: 230
Rep:
I wouldnt recommend logging in as root regularly. Heres what to do; when you are in a command prompt, you can type 'sudo' (no quotes) before a command to execute as root, or just type 'su' (no quotes) alone at a prompt to get a root console. You can then continue with your business.
The way sudo works by default is that you need to put your account in the /etc/sudoers file in order to use sudo; and then it asks for your password. This is much more secure than using "su" since you can do anything as root from your account without needing to log in as root; but you don't need to worry about leaving your account logged in since you need to enter your password (which random people don't know) in order to use sudo. Also, you can restrict what commands can be used with sudo, etc.
How concerned do I need to be that I've logged in as root? I've only logged in as root to install some software (Firefox then Opera is about it). Given I haven't done much, is it such a risk that a reinstall is warranted??
If something is not in an RPM package, how do I install it as not root? I'm starting to think this is a question more for the newbie section...
it's normal to switch to the root user (via sudo, sux -, kdesu, or when prompted by yast) to install software. the normal user doesn't have (and shouldn't have) the permissions to write to system directories.
How concerned do I need to be that I've logged in as root? I've only logged in as root to install some software (Firefox then Opera is about it). Given I haven't done much, is it such a risk that a reinstall is warranted??
No. Logging in as root is only dangerous because you can easily make a mistake and break the whole system. Its also generally not a good idea to run desktop applications (eg. web browsers) as root for security reasons, but unless you have seen some indication that your comp. has been compromised you'd have to be extremely, extremely paranoid to want to re-install just because you once ran firefox as root
Quote:
If something is not in an RPM package, how do I install it as not root? I'm starting to think this is a question more for the newbie section...
Assuming you're talking about .tar.gz source packages? The only bit that you need to run as root is the make install, eg:
Code:
./configure
make
sudo make install
For binary installers (eg. the one for Firefox that you download from mozilla.org) you only need to run it as root if you want to install it to be accessible to all users, not just yourself. In this case
Code:
sudo ./firefox-installer.bin
To use sudo you need to setup your user in it. To do this edit the /etc/sudoers file with a text editor or using the visudo command, running as root, and add the following under "# User privilege specification":
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.