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 - 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 09-23-2012, 07:40 AM   #1
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
I'm not sure how this happened but I'm sure there is a lesson in there somewhere


So I just got done ripping my hair out for the past hour because slim wasn't allowing me to log in with my main account. All others included newly created accounts worked, so I figured it had to be related to my directory

After checking every config file related to X's startup I couldn't find anything wrong. .xinitrc and .Xauthority were fine.

by chance I must have moved the cursor in .xinitrc, so it asked me to save. I got a permission denied.

Upon closer inspection my home directory's owner and group permissions were set to root. I don't know how it happened, but I probably accidently ran something in a root window that screwed up.

Morale of the story, use SU.
 
Old 09-23-2012, 08:42 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
Quote:
Originally Posted by mreff555 View Post
Upon closer inspection my home directory's owner and group permissions were set to root. I don't know how it happened, but I probably accidently ran something in a root window that screwed up.
What does stat or the logs say?

"probably" is ...
 
Old 09-23-2012, 01:50 PM   #3
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Original Poster
Rep: Reputation: Disabled
which logs are you referring to?

oddly enough I was unable to find anything odd in xorg.0.log or slim.log
 
Old 09-23-2012, 02:51 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
And the lesson, repeated many times in many places: NEVER do ANYTHING with "root" permission (or logged in as "root") unles there's NO other way to accomplish the task.

And, if you really need "root" permissions, use sudo before you log in as "root."
 
Old 09-23-2012, 04:03 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
If you were logged in as root at that time (or had a root shell open) you should be able to see what you have done in the history file of the root account.
 
Old 09-23-2012, 04:34 PM   #6
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Original Poster
Rep: Reputation: Disabled
possibly, but I've been logged in for days and I have been performing quite a lot of operations. Honestly I not sure what I did would really stand out in the logs anyway. One way or another I just need to be more careful not to run graphical operations as root.
It took me a long time to get used to sudo. Now I'm trying to get used to not having it now that I have been using gentoo. I guess I could install it.
 
Old 09-24-2012, 02:09 AM   #7
guyonearth
Member
 
Registered: Jun 2012
Location: USA
Distribution: Ubuntu
Posts: 424

Rep: Reputation: 83
You'll get little sympathy here if you screw up your system while you're running as root. There's simply no compelling reason to do that. The pitfalls are well documented, and the whole rationale of having a multi-user system is that you simply don't do that.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Lesson about Linux smag Linux - General 10 10-30-2011 07:27 AM
My lesson for today SeRi@lDiE Slackware 8 06-29-2011 08:53 PM
Garageband Guitar Lesson 5, no help anywhere else Predatorian General 4 01-22-2011 03:07 PM
A Lesson on numbers Dogs General 5 03-22-2010 06:08 AM
Newbie learned his lesson... doody Linux - Newbie 4 09-02-2004 11:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:38 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