LinuxQuestions.org
Review your favorite Linux distribution.
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 03-12-2007, 09:50 AM   #16
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware 14.2
Posts: 200

Rep: Reputation: 112Reputation: 112

The NOT running as root hysteria has been blown all out of proportion. If you are running as a single user on a desktop at home, for example, then you are really just playing games with yourself if you are NOT running as root. I assume you are since my guess is that is about all knoppix is good for (no bash intended).

If you really didn't want to be bothered with the complexities of linux and just wanted a working OS "appliance", you'd be a Windows user. So that being the case, you will always be hacking on it and running as a user is just a pain in the butt.

I've been running as root under 4 distros since 1998 - and geeezz, I've never had a problem.

Now if the whole family uses the computer and you got kids then I could see having a user account for them. But for the home admin to always run as a user and constantly have to su is just plain silly.

My guess is that the root account (directory) just doesn't have anything set up in it to run the WM. I would compare the root directory with the user directory for a start.
 
Old 03-12-2007, 09:59 AM   #17
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
You're complaining because you have to su once in a while to edit xorg.conf? Bah! Humbug! Proud Cross Linux from Scratch user on my day-to-day box. There are 185-290 packages needed to install Xorg-7.1 depending on how many drivers and fonts you build. Each one requires root access to install. That's about 200 su -c 'make install' and I haven't even created an xorg.conf yet.
 
Old 03-12-2007, 11:57 AM   #18
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware 14.2
Posts: 200

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by Arow
That's about 200 su -c 'make install' and I haven't even created an xorg.conf yet.
But how do you know you won't accidentally type in "su rm -rf *"

To be really safe you should alias su to a script that provides the following validations in a series of questions:
1) Are you sure?
2) Are you really sure?
3) I'm not sure I believe you are really sure - Are you sure you're really sure?

 
Old 03-12-2007, 11:59 AM   #19
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,971
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by XavierP
Switch User, not substitute user. Apparently it's in the source code.

Back to your regular programming now
That's right....I had multiple windows open posting on a few differnt things (one of them being a poll on "su"...hehe).

But, you're right. It stands for Switch User.

-custangro

ps...I never login as root....
 
Old 03-12-2007, 12:03 PM   #20
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
Quote:
Originally Posted by coldbeer
But how do you know you won't accidentally type in "su rm -rf *"

To be really safe you should alias su to a script that provides the following validations in a series of questions:
1) Are you sure?
2) Are you really sure?
3) I'm not sure I believe you are really sure - Are you sure you're really sure?

Because once you type it right the first time, it's only a few up arrows away every other time.
 
Old 03-12-2007, 12:32 PM   #21
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Quote:
Originally Posted by custangro
That's right....I had multiple windows open posting on a few differnt things (one of them being a poll on "su"...hehe).

But, you're right. It stands for Switch User.

-custangro

ps...I never login as root....
That's where I got it from too And I haven't logged in as root for about 4 years. Discounting the first 10minutes of any Slackware setup, of course.
 
Old 03-12-2007, 01:40 PM   #22
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by coldbeer
The NOT running as root hysteria has been blown all out of proportion. If you are running as a single user on a desktop at home, for example, then you are really just playing games with yourself if you are NOT running as root. I assume you are since my guess is that is about all knoppix is good for (no bash intended).

If you really didn't want to be bothered with the complexities of linux and just wanted a working OS "appliance", you'd be a Windows user. So that being the case, you will always be hacking on it and running as a user is just a pain in the butt.

I've been running as root under 4 distros since 1998 - and geeezz, I've never had a problem.

Now if the whole family uses the computer and you got kids then I could see having a user account for them. But for the home admin to always run as a user and constantly have to su is just plain silly.

My guess is that the root account (directory) just doesn't have anything set up in it to run the WM. I would compare the root directory with the user directory for a start.
What's silly is people who got lucky for a long time
and are quite obviously clueless when it comes to security
to recommend to others not to use best practice.

"I've never used a seat-belt in my life, I think that
that whole inconvenience of putting on a seat-belt is
blown out of proportion!"

/me slaps his hand against his forehead.

If you STILL have to use root on a day-to-day basis
after all those years you definitely haven't learnt
enough about Linux usage and set-up.

If you were a windows user you'd be logged into your
box with full admin rights all the time by default.



Cheers,
Tink
 
Old 03-12-2007, 02:15 PM   #23
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware 14.2
Posts: 200

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by Tinkster
What's silly is people who got lucky for a long time
and are quite obviously clueless when it comes to security
to recommend to others not to use best practice.

"I've never used a seat-belt in my life, I think that
that whole inconvenience of putting on a seat-belt is
blown out of proportion!"
I'm obviously clueless? And the "best practice" is one size fits all, huh? If that's the case you, of course, put *your* home computer in a halon protected, air conditioned security room with an UPS.

And give me a break, you're comparing a single user on a home machine running as root to seat-belts and car accidents. LOL.

Your response is an example of the hysteria I was talking about.

Quote:
Originally Posted by Tinkster
If you STILL have to use root on a day-to-day basis
after all those years you definitely haven't learnt
enough about Linux usage and set-up.
Tink
So explain to me the exact risks I am taking by running running a single user home desktop as root?

I really want to know the specifics of what is going to happen to my single user home desktop linux system, so we can debate this point by point. We'll see who's clueless.

I would be more concerned about an asteroid hitting me.

Last edited by coldbeer; 03-12-2007 at 02:17 PM.
 
Old 03-12-2007, 03:03 PM   #24
iamnothere
Member
 
Registered: Feb 2007
Location: UK
Distribution: Slamd 64, Slackware
Posts: 46

Rep: Reputation: 16
Quote:
So explain to me the exact risks I am taking by running running a single user home desktop as root?
Well, assuming that you're a robot and not a human being, and you don't actually run any programs, no risk at all. Human beings however, make mistakes, they get tired, distracted, and so on. Typing 'rm -fr / tmp/foo' instead of 'rm -fr /tmp/foo' as a non-root user isn't going to do any damage (except maybe wipe out your ~), but if you do that as root, then you get to reinstall. (From the _daily backup_ you make, right? Yeah, OK mate.)

Also, I assume that you have fully audited the source code of EVERY PROGRAM YOU RUN to make sure there are no bugs (Huh? Software with bugs? Surely not!) that are going to do something stupid like delete /etc/passwd or replace /lib/libc.so.6??????

Hey, I've never electrocuted myself, so I guess I don't need to wire up this earth cable eh?

BTW,

Quote:
planet earth but I would prefer to immigrate to mars.
I assume you mean EMIGRATE. As well as learning to use Linux properly, you might want to take a few English lessons too. (No offence, LOL.)

Last edited by iamnothere; 03-12-2007 at 03:05 PM.
 
Old 03-12-2007, 03:23 PM   #25
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
http://groups.google.co.uk/group/com...2f211d22247f77
http://groups.google.co.uk/group/com...830bdefdb6ab5a
http://groups.google.co.uk/group/com...57be26bdb52efd
http://groups.google.co.uk/group/com...33ff5c1f548825
http://groups.google.co.uk/group/com...d6bd6d9abefb1e
Some chat about this very subject.

Linus doesn't run as root, and if it's good enough for him, it's good enough for me
 
Old 03-12-2007, 03:35 PM   #26
PerfectReign
Member
 
Registered: Apr 2005
Location: Los Angeles
Distribution: openSUSE / Ubuntu
Posts: 294

Rep: Reputation: 33
Quote:
Originally Posted by lumix
this is a one-user laptop and I simply cannot get things done without more privilege.
Yes, there are things you need to do as root...

Quote:
Originally Posted by lumix
I'm not asking for philosophies, I just need to know how my user (let's say "user1") can:

1. copy files when where it pleases

2. start and stop hardware (like pc cards such as wireless)

3. load modules like wpa_supplicant

4. edit Xorg.conf
Well, I have no idea what xorg.conf is (graphics?) but I've been getting along just fine running as a user.

There are a couple of tools which can help you out. First off, if you really must, you can run Konqueror (or Nautalis) in super user mode. that gives you access to the whole shebang.

Second, you could always login to root and assign privileges to the various folders and subfolders you want access to.

Third, You could add your user to the root group. This should give your user the ability to do whatever.

Fourth, you could just go into YaST (or whatever system admin tool you have) to do the stuff you need.

I personally like not running as root for the simple reason that my stuff stays in my /home/kai folder and is transferable to other systems. Yeah, I could run as root and not muck things up, but that's not my prime motivator.
 
Old 03-12-2007, 04:22 PM   #27
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware 14.2
Posts: 200

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by iamnothere
Well, assuming that you're a robot and not a human being, and you don't actually run any programs, no risk at all. Human beings however, make mistakes, they get tired, distracted, and so on. Typing 'rm -fr / tmp/foo' instead of 'rm -fr /tmp/foo' as a non-root user isn't going to do any damage (except maybe wipe out your ~), but if you do that as root, then you get to reinstall. (From the _daily backup_ you make, right? Yeah, OK mate.)
Ok, everyone who has actually every typed in 'rm -fr / tmp/foo' please standup. Exactly. And actually, I do make sure everything important is backed up.

So are you saying that you don't keep *any* important documents in your user directory or that the installed system is more important that any personal documents?

I guess you immediately change the permissions on your documents in your user area and alias the rm -f function for users right? Didn't think so.

I'll stick with good backups, thank you.


Quote:
Originally Posted by iamnothere
Also, I assume that you have fully audited the source code of EVERY PROGRAM YOU RUN to make sure there are no bugs (Huh? Software with bugs? Surely not!) that are going to do something stupid like delete /etc/passwd or replace /lib/libc.so.6??????
If you mean do I install some odd software off the web that could be a trojan; Even if I didn't run as root I wouldn't do that.

If you mean I'm installing the 50th stable version of an open source project - I again think its a silly position - the risk is slight.

There is a much higher risk that a bad software program would install *over* some other file and screw up your system. And make install is done as root, so you are not protected.


Quote:
Originally Posted by iamnothere
Hey, I've never electrocuted myself, so I guess I don't need to wire up this earth cable eh?
You better put a seatbelt on your lawnmower - because if its good for cars, then its gotta be good for lawnmowers too right?


Quote:
Originally Posted by iamnothere
BTW,

I assume you mean EMIGRATE. As well as learning to use Linux properly, you might want to take a few English lessons too. (No offence, LOL.)
I assume you mean GNU/LINUX as Linux is the kernel. As well as learning to about probabilities and comparative risks you might want to learn about the history of OS's too, (No offence, LOL.)
 
Old 03-12-2007, 04:48 PM   #28
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Okaaayyyyy

Thanks to all who understood the word "deprecate."

I DID in fact imagine that before long I wouldn't want to be root for every day use. However, I can't remember a single week in the last 20 years that didn't involve working under the hood, and it'd sure suck to have to say "sudo" every time I want to remove a nut or bolt.

For those who roll your eyes:

1. Be polite. Last I checked, it's customary to consider oneself an ambassador when answering in a newbie forum.

2. The inclusion of background wasn't intended to impress, nor did I imagine it would, but it's often helpful to know the background of a user when supporting/assisting them. Especially when that person is suggesting that they might want to operate in a fairly risky mode.

3. Linux, to a newbie, is more frustrating than anything I know of. You thought so too.


As for convenience, yes, it does seem potentiallyinconvenient. But since I've learned that a few shortcuts can cover 90% or better of the need to sudo or su, it won't be such a hassle after all.

Perhaps one should keep it to oneself if they can't remember the early experience and moreover, just can't show how a few solutions can work. If you feel impatient, best to go another forum and be helpful there.

Thanks again, to most.

Last edited by lumix; 03-12-2007 at 04:53 PM.
 
Old 03-12-2007, 05:27 PM   #29
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,971
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by XavierP
Linus doesn't run as root, and if it's good enough for him, it's good enough for me
I like the way you think...

Anywhoo....if you want to run as root it's fine. If you are so adamant about your user having root privileges (and you don't want to do sudo), then you can edit your /etc/passwd file. Change the GID and UID of the user to 0. Now you have root privileges.


everyone is posting analogies, I'll be direct:

I've never done any damage to my Linux box...then again...I've never logged in as root either...

-custangro

Last edited by custangro; 03-12-2007 at 05:28 PM.
 
Old 03-12-2007, 05:33 PM   #30
iamnothere
Member
 
Registered: Feb 2007
Location: UK
Distribution: Slamd 64, Slackware
Posts: 46

Rep: Reputation: 16
Quote:
Originally Posted by coldbeer
Ok, everyone who has actually every typed in 'rm -fr / tmp/foo' please standup. Exactly. And actually, I do make sure everything important is backed up.

So are you saying that you don't keep *any* important documents in your user directory or that the installed system is more important that any personal documents?

I guess you immediately change the permissions on your documents in your user area and alias the rm -f function for users right? Didn't think so.

I'll stick with good backups, thank you.
rm -fr / home/user/old_stuff. Whatever. I use rm -fr all the time. Are you claiming that noone has ever deleted data by accident? I don't think so. My important documents are properly backed up multiple times. That still doesn't mean I run as root. Also, I can only delete my own files, not those of all users, as a rm -fr / as root would do. Good backups are imperative, yes. But backups are not an alternative to sensible usage. Maybe you're perfect, most of us aren't. The point is that people inevitably do stupid things, even you. Not running as root is part of protecting oneself against one's own stupidity. You think reinstalling from backup is a sensible alternative to taking simple precautions? You must have a lot of time on your hands. Why don't you get a job, heh heh. (joke!)

Quote:
If you mean do I install some odd software off the web that could be a trojan; Even if I didn't run as root I wouldn't do that.

If you mean I'm installing the 50th stable version of an open source project - I again think its a silly position - the risk is slight.

There is a much higher risk that a bad software program would install *over* some other file and screw up your system. And make install is done as root, so you are not protected.
Even "stable" software has bugs and can do unknown things. BTW, I never use 'make install' as root. I start by installing under ~/pkgs as non-root and test the program before finally making a slackpkg.

OK, so you're probably not going to blow your house up by running as root, but non-root is not about absolute security, it's about not shooting yourself in the foot.

Quote:
You better put a seatbelt on your lawnmower - because if its good for cars, then its gotta be good for lawnmowers too right?
Er, so it must be good for motorbikes too? That doesn't really make sense. Anyway, I haven't got a lawnmower. The grass in my garden if 5 feet tall (well, not now, but it is in the summer). Who cares? My windows are covered in dirt, so I can't see out anyway.

Quote:
I assume you mean GNU/LINUX as Linux is the kernel. As well as learning to about probabilities and comparative risks you might want to learn about the history of OS's too, (No offence, LOL.)
I mean "Linux" as an accepted contraction of "GNU/Linux". I can't be bothered to say "GNU/Linux" all the time. I use Slackware (as you can see on the left there), which doesn't have anyother libc than glibc, so the GNU is redundant.

Oh, and yes, I have actually wiped out my ~ with a 'rm -fr /home /<old_user>'. I've also wiped out my entire data filesystem before (though that was due to forgetting to reboot after an fdisk, rather than a typo). Most people done something like this, at least once, haven't they? Or am I just a douchebag?
 
  


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
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 05:27 PM
LXer: Summary of topics discussed at OSDL Desktop Linux Printing Summit LXer Syndicated Linux News 0 04-15-2006 06:03 PM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 09:32 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 05:14 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 05:14 PM


All times are GMT -5. The time now is 06:06 AM.

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