LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 05-22-2003, 11:37 PM   #1
computergirl
Member
 
Registered: Mar 2002
Location: Green Bay,Wisconsin US
Distribution: PCLinuxOS .9
Posts: 53

Rep: Reputation: 15
Uid problem, can't log in


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 .

Any help would be appreciated.
 
Old 05-23-2003, 12:04 AM   #2
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Rep: Reputation: 30
Try setting your UID to 500. It's default for RH.
 
Old 05-23-2003, 12:10 AM   #3
yowwww
Member
 
Registered: Apr 2003
Location: Ontario, Canada
Distribution: Arch Linux
Posts: 533

Rep: Reputation: 30
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.
 
Old 05-23-2003, 12:10 AM   #4
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
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 .
 
Old 05-23-2003, 04:00 AM   #5
webtoe
Member
 
Registered: Apr 2001
Location: Cambridge, England
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617

Rep: Reputation: 30
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.

HTH

ALex
 
Old 05-23-2003, 06:09 PM   #6
computergirl
Member
 
Registered: Mar 2002
Location: Green Bay,Wisconsin US
Distribution: PCLinuxOS .9
Posts: 53

Original Poster
Rep: Reputation: 15
Thank you all for your help. I did it and it worked. I then moved all the old files to my new account and deleted the old account.

As I use Linux more, and learn more, I'm beginning to wonder why I ever used Windows for as long as I did.

Thanks Again!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeated Log Entry: sshd: authentication failure; logname= uid=0 360 Linux - Security 1 10-07-2005 12:23 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
Mounting NFS Shares ... UID Problem Riddick Linux - Software 1 01-06-2005 09:48 AM
log.winbindd:uid range missing or invalid jwizardc Linux - Networking 1 07-14-2004 10:24 AM
Wrong uid in /var/log/messages wfhoney Linux - Security 1 02-12-2004 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:23 AM.

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