View previous topic :: View next topic |
Author |
Message |
drakonite l33t
Joined: 02 Nov 2002 Posts: 768 Location: Lincoln, NE
|
Posted: Tue Apr 08, 2003 12:05 am Post subject: |
|
|
Jarjar wrote: | Actually, the "virus" risk should be as big using sudo as using root. Imagine that you've configured sudo to allow your user all root commands (like i have). Then a malicious program simply run "sudo rm -rf /", same effect?
|
That's why allowing sudo to all command without a password is a bad idea too. It will make it so you have to dilberatly act as root which will lower the chance of accidentally "rm -rf / somedirectory" to your filesystem but won't give any real protection against malicious programs. _________________ Shoot Pixels Not People
My GPG/PGP Public key |
|
Back to top |
|
|
PowerFactor Veteran
Joined: 30 Jan 2003 Posts: 1693 Location: out of it
|
Posted: Tue Apr 08, 2003 12:06 am Post subject: |
|
|
Jarjar wrote: | Actually, the "virus" risk should be as big using sudo as using root. Imagine that you've configured sudo to allow your user all root commands (like i have). Then a malicious program simply run "sudo rm -rf /", same effect?
| One good reason to not give your user sudo access to rm.
If you give your user passwordless sudo access to every command it doesn't really offer much protection at all.
EDIT:doh! drakonite beat me to it. preview wasn't fast enough |
|
Back to top |
|
|
bos_mindwarp Apprentice
Joined: 19 Oct 2002 Posts: 275 Location: stockholm, sweden
|
Posted: Tue Apr 08, 2003 1:01 pm Post subject: |
|
|
once I did:
Code: | rm -rf / tmp/somedir/hej.doc |
note the space after first slash |
|
Back to top |
|
|
maca Tux's lil' helper
Joined: 26 Jun 2003 Posts: 84 Location: Perth, Australia
|
Posted: Wed Nov 12, 2003 10:38 am Post subject: |
|
|
if you dont like typing su ...make a symbolic link to it with s. Im not going to belabour the points that all the others have made .... but put simply if your in a production environment things should be more stable .... root is used for configs and such like, not for day to day scripting and or coding .... my advise is learn to use chmod chown chgrp and put users where they belong "behind a big farking wall that stops them doing anything" rember 99% of problems are between the keyboard and the chair. _________________ You can take nothing from me that I will more freely give, except my life
William Shakespeare
Hamlet |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Wed Nov 12, 2003 1:23 pm Post subject: |
|
|
kraylus wrote: |
how do you do that? i have my non-priv users in the wheel group, but i still have to su and type in a pw to be root. i would like to avoid that if possible... thanks! |
You can do this with sudo, once it's emerged edit the /etc/sudoers file and uncomment the line below the line that says 'Same thing without a password'.
This will allow all users in the wheel group to sudo without a password.
You obviously still have to be careful with sudo, but at least it makes you think about what you're typing. _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
RedBeard0531 Guru
Joined: 21 Sep 2002 Posts: 415 Location: maryland
|
Posted: Wed Nov 12, 2003 8:41 pm Post subject: |
|
|
I run as root and the onlything i've hosed in the past few years has been my home dir whih runnen as a user wouldnt protect me from. I type rm ~/ .gaim or whatever and poof! there goes myhome dir. the ironic thing is that since gaim is a directory it isnt deleted. A few years ago i hosed a mdk system while installing aim for linux. I untared it to my /root instead of to my / dir( I was new and both are called the root directory). When i went to delete ~/usr, I forgot the ~. After that I swore i'd never run as root again. Shortly after i started usen gento, I went back to runnen as root. It is a lot easier.
I have a question though- Why the -f switch on rm? seems like a wasted letter as rm -r works for me. _________________ OH MY GOD! Kenny just killed Kenny!
That Basterd! |
|
Back to top |
|
|
baigsabeeh Guru
Joined: 28 Sep 2005 Posts: 520 Location: North Brunswick, NJ
|
Posted: Mon Nov 21, 2005 9:54 pm Post subject: How Dangerous Is This |
|
|
I hate to have a normal user and I never had one in Fedora Core 3 when I used that for nearly a year as the root user. How dangerous is it to work and do stuff regularly as the root user? |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Mon Nov 21, 2005 10:04 pm Post subject: |
|
|
Moved from Desktop Environments to Networking & Security as it does not seem to be a question of installing/configuring/using a graphical environment, but of security concerns.
You should only be running things as root on *nix when absolutely needed (such as editing a base system configuration file or the like). In fact, the strict user/root separation of priveleges and enforcement of that is one of the fundamental architecture designs of *nix that help make it more secure by default than some other operating systems.
Hope that helps. _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
jballou Tux's lil' helper
Joined: 10 Mar 2005 Posts: 128 Location: Baghdad, Iraq
|
Posted: Mon Nov 21, 2005 10:08 pm Post subject: |
|
|
It's insecure, like how Windows has every user need to be an administrator to do anything but use Notepad. It also keeps the dummy-proofing element out, as a user I can't be in the wrong dir, say, one with essential system files, and rm * -r. As root, if I'm switching between term tabs and I accidentally delete /etc instead of ~/.fvwm I am in a world of hurt. _________________ -Shuttle SN25P, Opteron 185, 74Gb WD Raptor, 2x 300Gb Barracuda 7200.9, 2x 1Gb Corsair dual channel, BFG GeForce 7800GT
-Asus Z7100 laptop, P-M 2.13, 2Gb DDR, 100Gb 7200RPM HDD, 128Mb GeForce 6600 Go. |
|
Back to top |
|
|
Monkeh Veteran
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Mon Nov 21, 2005 10:44 pm Post subject: Re: How Dangerous Is This |
|
|
baigsabeeh wrote: | How dangerous is it to work and do stuff regularly as the root user? |
Incredibly dangerous. Never, ever, EVER, do ANYTHING as root unless you HAVE TO. And you do not have to for any non-system-administration task. So don't. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20585
|
Posted: Mon Nov 21, 2005 11:34 pm Post subject: |
|
|
codergeek42 wrote: | Moved from Desktop Environments to Networking & Security as it does not seem to be a question of installing/configuring/using a graphical environment, but of security concerns. | That would've been fine. I just happened to know about this thread. Might as well move it to N&S -- the '03 thread was in Chat. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Mon Nov 21, 2005 11:36 pm Post subject: |
|
|
Nifty. Thanks, pjp. _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
baigsabeeh Guru
Joined: 28 Sep 2005 Posts: 520 Location: North Brunswick, NJ
|
Posted: Tue Nov 22, 2005 12:14 am Post subject: |
|
|
Then could I just use root until I have all my programs setup to the point that I wouldn't need to install more and then just make an everyday user that would be allowed to use those programs. How would I configure a new user anyway? |
|
Back to top |
|
|
maca Tux's lil' helper
Joined: 26 Jun 2003 Posts: 84 Location: Perth, Australia
|
Posted: Tue Nov 22, 2005 2:23 am Post subject: root user |
|
|
man useradd _________________ You can take nothing from me that I will more freely give, except my life
William Shakespeare
Hamlet |
|
Back to top |
|
|
abaelinor n00b
Joined: 27 Aug 2005 Posts: 51
|
Posted: Tue Nov 22, 2005 2:53 am Post subject: |
|
|
aa
Last edited by abaelinor on Tue Oct 21, 2008 1:41 pm; edited 1 time in total |
|
Back to top |
|
|
c4 Guru
Joined: 21 Feb 2004 Posts: 312 Location: Sweden
|
Posted: Tue Nov 22, 2005 4:46 pm Post subject: |
|
|
kraylus wrote: | CountZero wrote: | I set up su so that users of the wheel group don't have to type a password to be root. |
how do you do that? i have my non-priv users in the wheel group, but i still have to su and type in a pw to be root. i would like to avoid that if possible... thanks! |
Check the settings of File: /etc/pam.d/su There you can either allow certain users to use 'su' without needing a password, or the entire wheel group if you like. _________________ AMD64 Gentoo Hardened server
AMD64 Xubuntu Desktop
X86 Dreamlinux Vaio laptop |
|
Back to top |
|
|
bacentergt Tux's lil' helper
Joined: 24 Oct 2005 Posts: 82
|
Posted: Tue Nov 29, 2005 12:20 am Post subject: Why is root so dangerous????? |
|
|
When I try to run xsane, I get the following warning:
Quote: | You are trying to run xsane as root, thats really dangerous!!!, dont send
bugs or look for help, you are alone!! |
and then:
Quote: | "continue at your own risk" |
Why is it so dangerous, and how i can create a new user.? _________________ JESUS is the LORD |
|
Back to top |
|
|
RuiP l33t
Joined: 15 Jan 2005 Posts: 643
|
Posted: Tue Nov 29, 2005 12:30 am Post subject: |
|
|
among other things:
rm -rf /
can do funny things (delete ALL your OS is fun and pedagogic)
allow you, when you are tired, to do rm -rf / (i just do it an hour ago... luckly i backup yesterday:))
install whatever at once
allow anyone who are access to your computer delete or install whatever at once
etc.
to add a user (do it as soon as possible)
just type:
adduser |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Tue Nov 29, 2005 12:34 am Post subject: |
|
|
Merged bacentergt's thread, "Why is root so dangerous?????" with this thread. _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
sundialsvc4 Guru
Joined: 10 Nov 2005 Posts: 436
|
Posted: Tue Nov 29, 2005 4:18 am Post subject: |
|
|
It's always weirded-me-out that tens of thousands of Windows installations are out there .. with security turned off, and no one's telling anyone (almost) that the feature even exists. Much less how to use it. Completely dumb: people lock their cars, doors, and windows at night, but not their computers?! And what's worse: nobody's telling them that they should do it?
Anyhow... remember: any program that you execute, executes as you. That means that it can do, what you can do, whether you intended for it to do so or not. Ahh, there's the rub. And that's why viruses exist. The virus, executing with administrative powers, tells the computer to do something totally evil and stupid, and the computer obeys.
Even if you are "the god of your machine," you don't pull out your magic-wand at every moment. Most of the time you're just an ordinary person. Exercising "godly powers" ought to require an explicit act on your part, and this very simple mechanism does just that. |
|
Back to top |
|
|
MidighToker n00b
Joined: 03 Nov 2005 Posts: 21
|
Posted: Tue Nov 29, 2005 5:26 am Post subject: |
|
|
does it make me a bad man to have "sudo /bin/bash" in my .bashrc file on the mac? _________________ occasionally, when I get the chance, I nohup sleep;
######
# some details might be changed in code snippets to protect from spiders. (eg IPs replaced with $ip) |
|
Back to top |
|
|
|