LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   I'm addicted to root :( (https://www.linuxquestions.org/questions/linux-general-1/im-addicted-to-root-305322/)

AC97Conquerer 03-23-2005 09:30 PM

I'm addicted to root :(
 
Every linux tutorial I read always says something like: "NEVER log in as root, so you don't mess things up jerk!!" And that makes me feel bad :(. One time I actually went:
Code:

chmod -R 777 /
instead of
Code:

chmod -R 777 ./
Because I was trying to make my uploads directory for Apache allow uploads...and then I went to an IRC chat called hackers and I told them to hack my computer because I didn't my computer to live anymore. They were having troubles with ssh and I had to give them the username/password. They deleted a lot of stuff and one of the nice hackers told me how to fix my problem, ... the not so nice hacker changed my root password before I rebooted and I had to reinstall debian :(

:cry: but I still like the root account...does anyone else use the root account regularly like me?

youngtom 03-23-2005 10:36 PM

Many years ago I did until I typed "rm -rf *" from the root directory (i thought that I was elsewhere) so after that disaster I learned to only use root when I absolutely need it.

AC97Conquerer 03-23-2005 10:37 PM

Well at least some people learn from their mistakes lol

btmiller 03-23-2005 11:02 PM

And so should you. BTW it's a really bad idea to let random people mess around with your computer (particularly if said random people are found on a "hacker" IRC channel). Unless you like the thought of the Feds breaking down your door when one of them tries to compromise a dot mil site using your computer.

Seriously, just make a normal user account for yourself and use it. Use su or sudo when it's absolutely necessary to be root.

Optimistic 03-24-2005 12:04 AM

To avoid the classic rm -rf * problem, just set up some aliases in your bashrc file. In root's bashrc file I have:
# Alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

Also, I set my regular user to show up in the terminal red while root shows up bright green. To do this just set the export PS1 option. I have root set to |\e[32m\e[1m\u\e[0m:\w|: while my regular user is: PS1='[\e[31m\u\e[0m:\w]:'

Looks cool and helps to prevent problems.

dns21 03-24-2005 12:09 AM

Pop in a windows disk and restart your computer

reddazz 03-24-2005 01:37 AM

I don't know whether to take your story seriously or not. Who in their right mind gives their password to unknown people and asks them to hack into their system. Its not difficult to use a non-root account and temporarily switch to root without having to do a full root login, just do a few minutes of reading. So how come you got the skills to install Debian (which can be a pain in the bum to install) but can't administer your own system. Thats why I said your post doesn't seem genuine to me.

AC97Conquerer 03-24-2005 12:09 PM

dns LOL, you're too funny... ... but you know dns, I could do this in Windows, since I create a lot of batch files:
Code:

del /Q /S C:
Thank you Optimistic! I changed root to 34, I like it!

reddazz, I gave the password because I thought it would be too difficult to change all of my files from 777 back to their original. So I gave my password away because I knew I probably was going to reinstall, and I wanted to see what they would do..for fun, because I knew I was going to reinstall debian anyways! But, you guys are right...let me add a new user...I'm going to name him...psycho

I'm downloading a lot of UT2004 maps right now so when I relogin I'll switch to psycho and su root.

Ken1015 03-24-2005 01:26 PM

I'm always root when I'm in Windoze but I only login as root in Linux when absolutely necessary. This is funny because just last night the instructor in a web security class I'm taking commented on the irony of this behavior. It's ironic that most of us login as root on the most insecure OS and non-root on the most secure OS.

dns21 03-24-2005 09:22 PM

Quote:

Originally posted by Ken1015
I'm always root when I'm in Windoze but I only login as root in Linux when absolutely necessary. This is funny because just last night the instructor in a web security class I'm taking commented on the irony of this behavior. It's ironic that most of us login as root on the most insecure OS and non-root on the most secure OS.
Root or not, windows is still windows. As far as Im concerned, if somebody is interested in breaking into my windows box, i'm sure they know how to gain privileges. It isn't too difficult from what I have seen in some of the very few windows security documents I have read.

Feminista 03-24-2005 10:30 PM

I logged in as root a bit too much before I learned to do administration from the command line. It's odd, I'd been coding my own websites for..... *counts*...... four years before I started using Linux, and hosting my own for a full year, but I could never remember the syntax for chmodding, so I used to login as root and start up gnome just for permissions management. Of course, I broke myself of that in a couple of days, because gnome (well, DEs in general) is way too much for me. And 'su' 'chmod 775' is way easier than logging out, logging in, starting x, finding the file in the slow GUI, right-clicking... ugh.

rnturn 03-25-2005 12:40 AM

Re: I'm addicted to root :(
 
"AC97Conquerer" said:
Quote:

:cry: but I still like the root account...does anyone else use the root account regularly like me?
This reminds me of a couple of things: First is a skit that Bob Newhart did while a guest on MAD-TV a few years ago. He was a psychiatrist whose advice to a patient was: JUST STOP IT! Finally, there's the ancient vaudeville routine: "It hurts when I do this." "Well, then, don't do that!"

Hopefully you learned not to give out your superuser password to strangers on IRC.

In answer to "AC"s question: There are systems where I may work all day logged in as root. Mainly because I have to. They are development systems and a lot of my daily work involves doing things as root for users/developers. Having to prefix every little command with "sudo" or "su - root -c" would be pretty awful. Then I have administrative rights to a bunch of other department's systems. In most cases one needs to come into those systems over the network (it's either that or I hop in the car and hit the road to a remote site) and root logins are not allowed from network connections. Period. On those systems, you have to "su - root" or use sudo; it depends on the amount of work that needs to be done.

At home there are similar situations where I may work as root for hours when working on system scripts and the like. I'm posting this, however, from a non-root account that is used 99.999+ACU- of the time I'm on the system. If you're running a graphical environment, the tasks that require root access generally prompt you for the password anyway so there's no real advantage to running in that environment as root.

Be safe, use root only when you really need it.

"ken1015" said:
Quote:

I'm always root when I'm in Windoze
And yet they claim Windows is more secure than Linux. Ironic, isn't it? I gotta tell you that it gives me the willies having to allow my third grade duaghters to play games on the XP system using the missus's login. She and I are configured as administrators, the girls are not. But as Windows security (my favorite oxymoron) won't allow them to play games using a non-administrative account, we end up handing over superuser status to them. There oughta be a law!

AlexV 03-25-2005 01:42 PM

Quote:

Originally posted by AC97Conquerer
So I gave my password away because I knew I probably was going to reinstall, and I wanted to see what they would do..for fun, because I knew I was going to reinstall debian anyways!
Ooh! Ooh! Please e-mail me you credit card and social security numbers as well as your root password! Come on, it'll be fun :rolleyes:

My goodness... I hope you don't keep any personal information on that box... :tisk:

perfect_circle 03-25-2005 02:25 PM

I consider my self an experienced linux user. I'm not a linux guru, but linux is my main desktop.

4 days ago, I tried to install matlab, and something went wrong.
SO i browsed to the matlab directory,
Code:

cd /usr/local/matlab7
And there was a /usr/local/matlab7/etc directory created.
and I did
Code:

rm -fr /etc
instead of
Code:

rm -fr ./etc
Then I stared for over five minutes at the console socked, not wanting to believe what had happened.
fortunately slackware has a pretty flexible packet managment and i was able to bring up my system again without having to do a clean install.
I'll start backing up my /etc from now on.

mikeymorgan 03-26-2005 02:43 PM

Well im addicted to root... beer! :D


All times are GMT -5. The time now is 08:58 PM.