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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-20-2012, 03:39 AM
|
#1
|
Member
Registered: Dec 2002
Posts: 228
Rep:
|
Accidiently gave "/" ownership to wrong user....
Hey
I wanted another user to be able to write to "/" but by mistake I made the owner of all the files in "/" to another user. I noticed and tried to change it back and I did. Just in case, I restarted and now Im stuck at the logon screen. It displays and when I try to enter my password, it goes black and just goes back to the logon screen.
What would be the best way to fix this? A format would be ideal (nothing important on it) but its been a couple of days of configuring this server and configuring it AGAIN would just piss me off......
I just want to enter the OS and be able to access (and acutally do stuff)
|
|
|
09-20-2012, 04:09 AM
|
#2
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Ive been able to access a root shell (thank god)
would a
chown -R root:root /
fix everything?
|
|
|
09-20-2012, 04:16 AM
|
#3
|
Member
Registered: Jun 2011
Location: India
Posts: 31
Rep: 
|
Yes, it will make the owner and group as root for all the files and directories under / recursively.
|
|
|
09-20-2012, 04:47 AM
|
#4
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Running it now. I thought I was going to reformat this.......
|
|
|
09-20-2012, 04:50 AM
|
#5
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Nothing. Same thing login comes up, I enter my password, black screen, login again comes up, Io enter again my password, black screen, login come up.........etc infinite.
Another issue perhaps?
|
|
|
09-20-2012, 04:55 AM
|
#6
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
Changing ownership of all files to root will not fix the problem. Do not do it. If your first command was recursively, with "-R" option, then it can be hard to fix (first try to change your user home directory ownership to you), depending on what ditribution you use, what programs installed, etc. Please specify also if you changed only owner or permissions too?
|
|
|
09-20-2012, 05:32 AM
|
#7
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Quote:
Originally Posted by eSelix
Changing ownership of all files to root will not fix the problem. Do not do it. If your first command was recursively, with "-R" option, then it can be hard to fix (first try to change your user home directory ownership to you), depending on what ditribution you use, what programs installed, etc. Please specify also if you changed only owner or permissions too?
|
Well, sudo was broken but I have been able to fix it.
I changed owner AND permissions. I changed the ownership of all files to root (like you said NOT to do; Sorry, did it before you replied) and still the desktop does not show up.
I know the system is problably 90% broken but is there any way to get back into the desktop?
|
|
|
09-20-2012, 05:37 AM
|
#8
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Another thing, I change to the terminal on the login screen (Ctrl+Alt+F1) and I cannot login as root .
I can change to root (the user) once logged in though.
|
|
|
09-20-2012, 05:45 AM
|
#9
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Back into the desktop  Man that took some time!
I tried different things and changing /tmp to 777 did the trick.
|
|
|
09-20-2012, 05:58 AM
|
#10
|
Moderator
Registered: May 2001
Posts: 29,415
|
OK, all of that is nice for being able to get back in but it doesn't really solve things, right? You still have to reset all ownership and permissions. How you do that depends on your distribution. Either list it in your control panel or post here if unsure what to do.
|
|
|
09-20-2012, 06:00 AM
|
#11
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
My MySQL server doesnt start so fuck it; Im reformatting it and reinstall it from sratch.
Too bad Ubuntu doesnt have a System Restore like Windows.
|
|
|
09-20-2012, 06:01 AM
|
#12
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Quote:
Originally Posted by unSpawn
OK, all of that is nice for being able to get back in but it doesn't really solve things, right? You still have to reset all ownership and permissions. How you do that depends on your distribution. Either list it in your control panel or post here if unsure what to do.
|
Ubuntu thought I put it, sorry about that.
Im reformatting and reinstalling but I havent hit the next button yet.........
|
|
|
09-20-2012, 06:14 AM
|
#13
|
Member
Registered: Dec 2002
Posts: 228
Original Poster
Rep:
|
Formatting now.
|
|
|
09-20-2012, 08:40 AM
|
#14
|
Senior Member
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep: 
|
Word of advice,... make your /home partition separate from / , that is, if you don't already. In that instance, you only have to format the / partition, and can leave /home intact... Fixing just the /home partition's permissions and migrating data after a reinstall or upgrade is easier than having to wipe the drive and resort to backups.
PS: 2nd piece of advice,... instead of changing permissions, you should have just added admin rights to the other user on the sudoers list, or used group permissions to do the same thing, provided that kind of permission structure was compatible with whatever software you were using.
Last edited by JaseP; 09-20-2012 at 08:44 AM.
|
|
|
All times are GMT -5. The time now is 06:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|