Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
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.
Ok, I'll say this ahead of time I did a very dumb thing.
I've only had brief experience with Linux in the past and so I decided to install Mandrake 9.1 on Tuesday.
Well I saw a post on this board some time ago about someone who wanted to create an account that has the same rights as root. They were told to change the users uid to 0 in /etc/passwd. So that's what I did and when I realized how bad it was to do that it was to late. Thankfully I had created a seperate acct for my sister. So, I logged into her acct to change it back and now when I try to log in as myself I get an error message saying that I don't have permission to access $Home (sorry I can't remember the exact msg)and saying that because of that it can't start KDE. I'd like to be able to salvage this account because I have so much saved, set up and installed in there. I am thinking I may have remembered my uid wrong.
If you need any further info I'll do my very best .
yeah, or you can at least salvage your info by logging in as root and moving your saved info to a brand new account you can create for yourself
hey - Bigun! I noticed your note at the side about trying out red hat 8 and hating it, I actually laughed out loud for real - When I first started using red hat, I downloaded red hat 8 and I noticed all kinds of glitches and I didn't like it, so I decided to try 7.3 and haven't looked back since.
I will often say how bad 8 is, but I have to say that 9 is a marked improvement over 8, however; I am still using 7.3.
Your permissions are based on your user-ID and group-IDs, not your actual user name. So, I would suggest logging in as root, and changing the ownership of your home directory and contents.
First, make sure your UID is unique. Unless you have a ton of users on the system, it will prob'ly be one (or a couple) number(s) less than your sister's. You can try logging in as your user account then. If it works, you are golden. If not, as root, run...
chown -r user.user /home/user
...Change the "user" to the correct user name. Be sure to get the /home/user correct... If you accident'ly but a space in there, you'll take over EVERYTHING in /home. The chown command should set the UID/GID on everything in your home to your new ID number.
I'd also suggest waiting a bit to see if anybody else has a better idea.
A longer way would be to change the name of the directory /home/user to /home/olduser, then using userdel to delete the user account (but not the /home/olduser), then using useradd to add the user account back in, running the chown on the /home/olduser directory, and copying everything from the /home/olduser to the new /home/user .
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617
Rep:
This is what ive done before
except the correct command has a capital R for the switch :P
Code:
chown -R /home/username
You also run into this problem if you have your home directory on a separate partition, and you change distros. Some of them have different UIDs that others for the first user so this problem happens.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.