PDA

View Full Version : A "very" simple, and noob, question...



Cuddles
02-24-2004, 05:12 PM
Being almost a toddler in the Linux World, these kinds of issues are not a concern in the Windows World...

When would you need to be a Root, and when can you "live" with just being a "user"?

For months now, not having the idea/theory of this down yet, I have ALWAYS logged out as my User account, and re-logged in as Root, to do apt-get updates, installs, and upgrades. From the jest, within this forum, I am starting to feel that this isn't the case. That only "certain" things require you to be "God", and most "everything" else, can just be done as a User.

Like I said, I haven't quite "caught on" to Linux yet, and I haven't really found a "clear-cut" answer to "when and where" this seperation is made.

Can someone "elaborately enlighten" me on this perplexion? ( I would be thankful in being able to isolate my further learning in this area :D )

Cuddles
PS -=- I am quite sure that "this" forum has had these issues before, considering the "newness" a lot of people have to some of the "unique" situations that come along with Linux, and its concepts - but, maybe someone was unsure how to post it ?

rickenbacherus
02-24-2004, 05:28 PM
I have ALWAYS logged out as my User account, and re-logged in as Root, to do apt-get updates, installs, and upgrades.

Poor Cuddles has been corrupted by M$ but I think you've turned away from the darkside before it was too late. You never need to log in as root (well almost never :) ). You will usually be told when you need to get root. I execute most all commands that need to be done as root with sudo.

sudo xedit /boot/grub/menu.lst

You need to be part of the /etc/sudoers file. You can configure it to require a password or not. If you want to be root fine- just make sure you log in as user and get root when you need it. Don't use IRC or surf the web as root- even if you're using Knopix from cd and no hdd in the box. Why? Well, just try to get into #debian as root. ;) You would also have to configure GDM to allow a root login (not sure about KDM) as it does not by default.

I have a dozen or more terminals open usually and in one or two i get root and go about my business there. If using virtual terminals and you wish to change from root to user or visa versa simply say

login

and you'll have a prompt at which to log into.

Cuddles
02-24-2004, 05:47 PM
LOL :lol:

Yep - thats me, all over...

Too many years under M$ control - but Knoppix has parolled me :!:

To get the idea here, instead of doing the "sudo", couldn't I also just do a "su", log in, and when I am done, "exit" from the Root login? - I have been trying more things that way...

By using my method above, that "Root" login IS not global is it? ( in other words, only "that" window is Root, and doesn't make all other "running" windows, etc... Root, right? )

If I understand you correctly: the following is what "I used to do" -=- followed by what "I could do"

Root User Login -=- User Login ( with a su shell open, and when done, closing it )
apt-get anything -=- apt-get anything

I guess your idea by using the sudo [something] - is a "one shot" command, whereas, my usage, can have multiple commands before closing the window down.

You know, their might just be hope for me yet [giggle]
Cuddles

arkaine23
02-24-2004, 08:10 PM
I usually opt for the su in a terminal method... that way I have one term where I'm root and can do root things in there. It's more secure than allowing a regular user to sudo anything as long as you remember to close that terminal if you leave your computer.

Markus
02-24-2004, 08:18 PM
Seems to be a matter of taste :)

I prefer adding a rootshell icon to the kicker and changing the schema line in /usr/share/apps/konsole/su.desktop to Schema=GreenOnBlack.schema
just so I know who I really am :D

rickenbacherus
02-24-2004, 09:59 PM
LOL :lol:

Yep - thats me, all over...

Too many years under M$ control - but Knoppix has parolled me :!:

To get the idea here, instead of doing the "sudo", couldn't I also just do a "su", log in, and when I am done, "exit" from the Root login? - I have been trying more things that way...

By using my method above, that "Root" login IS not global is it? ( in other words, only "that" window is Root, and doesn't make all other "running" windows, etc... Root, right? )

If I understand you correctly: the following is what "I used to do" -=- followed by what "I could do"

Root User Login -=- User Login ( with a su shell open, and when done, closing it )
apt-get anything -=- apt-get anything

I guess your idea by using the sudo [something] - is a "one shot" command, whereas, my usage, can have multiple commands before closing the window down.

You know, their might just be hope for me yet [giggle]
Cuddles

Yes sudo is a one shot and getting root in a term is good if you intend on executing multiple commands as root and don't wish to type 'sudo' everytime. Of course leaving a root shell open on an accessable pc is probably not a good idea. ;) Like Markus said it is a matter of taste. Just don't feel that you have to log out and then back in- absolutely not necessary.

Cuddles
02-27-2004, 03:49 PM
Hey rickenbacherus, you should be proud of me - I have stuck in my "user" account for more than five days now - done apt-get installs, removals, checked system configurations, and made changes to "root" only files - all from within my "user" account :D

Markus, I did your idea - I created a "root shell" on my taskbar, and then went through the konsole desktop file and changed the schema to what you suggested.

Now I have about three konsole shells running, most all the time, two for "user", and one as "root". I do my apt-get and system stuff through the "root" konsole, and the two "user" konsoles are used for starting apps, the second one is for xkill - since my ALSA is being a pain in the rump - still trying to get it working, but - I fire off XMMS and it locks everytime, so the second konsole "user" window is a fast way to run xkill, and get rid of the locked-up XMMS...

I'm learning here, and, I think I am growing, as well - maybe in a few years of working with this, I may be a "seasoned pro" at all of this :?:

[giggle]
Cuddles

Markus
02-27-2004, 08:53 PM
The thought just occurred to me that the "root shell" is the thingy under K-menu -> Knoppix -> Root Shell which doesn't work for me while I'm not in sudoers.
I added the K-menu -> System -> More Programs -> Konsole Super User Mode
That's also the reason for the change in schema, I really dislike the default BlackOnYellow :evil:

PS. Instead of launching xkill try: killall xmms

rickenbacherus
02-27-2004, 10:09 PM
the second one is for xkill - since my ALSA is being a pain in the rump - still trying to get it working, but - I fire off XMMS and it locks everytime, so the second konsole "user" window is a fast way to run xkill, and get rid of the locked-up XMMS...

You could also just add a launcher to the taskbar for Xkill. ;)