LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-28-2003, 08:37 PM   #1
frontier1
Member
 
Registered: Feb 2003
Location: Culpeper,Va
Distribution: Mandrake 9.2 Knoppix 3.3 SuSe 9.0
Posts: 140

Rep: Reputation: 15
Is there a simple way to give all permissions


to a user (Myself), that way I would never have to log in as root, or does that defeat the purpose, and can it be dangerous?
 
Old 02-28-2003, 08:48 PM   #2
crichards
Member
 
Registered: Feb 2003
Location: Arizona
Distribution: Gentoo!
Posts: 124

Rep: Reputation: 15
It defeats the purpose, and is dangerous. You shouldn't need to log in as root anyway. There are tools that make sure you don't need to.

su allows you to become any user, but just typing 'su' will allow you to enter the root password.

sudo is much nicer (IMHO). It may not be installed, but you should be able to find it on your CDs. Just type 'sudo command' and enter your password, and the command will execute as root.
 
Old 02-28-2003, 08:50 PM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
You really should never have to log in as root. If you need to perform a task that requires root privelages then you should do:

su

at a command prompt to become root. When your done exit out of the root account. You don't want to be going about your system everyday as root when you don't need to.

FEAR THE ROOT!!!!

Whoops. Somebody got to this thread before I was done typing. Sorry for duplicating the previous advice.
 
Old 02-28-2003, 08:55 PM   #4
cnjohnson
Member
 
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544

Rep: Reputation: 30
Re: Is there a simple way to give all permissions

Quote:
Originally posted by frontier1
to a user (Myself), that way I would never have to log in as root, or does that defeat the purpose, and can it be dangerous?
How tempting, how tempting isn't it to ride roughshod over linux's default security. Can it be done, sure (I'll show you one method shortly); should it be done? No.

I belong to a linux user group (Nashville Linux User Group ) and not too long ago, someone brought his laptop in. He had gotten frustrated with having to log into and out of the root account to get admin tasks done. So, he had the bright idea of setting every file and file system to read-write-execute for every user. Do not try this at home:

chmod -R 777 /*

Well, Redhat stopped dead at almost every turn. What he did not realize is that many linux programs will refuse to operate correctly if certain files or file systems have incorrectly set permissions. We wiped the HD and reloaded. It was that or have him track down every file and file system and set correct permissions. Redhat has over 1400 packages and thousands of files. A daunting task!

But there are other, more subtle dangers. Work hard to avoid running root with X windows. Why? Because people can send you, say, Open Office documents with embedded macros that you might be tempted to run willy-nilly, like

rm -rf /*

Do that and you will be re-loading linux if you are root. If you are yourself, however, you will only(!) lose those files for which you have permissions. Bad enough, but not a disaster.

These are just two good reasons to avoid doing what your are after. Learn about the keyboard shortcuts ctrl-alt-F1 (to F6) and ctrl-alt-F7 (to F12). These are your friends.

There are, of course, time when you must run as root in Xwindows. If you must, you must. But the less you do it the safe you are from yourself and from others.

Cheers--
Charles
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give permissions for users....... manikantha Linux - General 1 03-17-2005 04:27 AM
Not able to give execute permissions needanyhelp? Linux - General 4 08-20-2004 05:19 AM
How do I give mounting permissions? TheMusicGuy Linux - Security 4 04-20-2004 09:16 PM
give it to me simple..mplayer... rab62184 Mandriva 12 11-13-2003 02:31 AM
Please give a simple sample about LOG in iptables! yuzuohong Linux - Networking 3 06-09-2002 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:37 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
Open Source Consulting | Domain Registration