LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-24-2011, 04:58 AM   #1
event2000
LQ Newbie
 
Registered: Sep 2006
Posts: 11

Rep: Reputation: 0
when i open new users terminal it starts in old users home


Hi

I added a new user. But if I start a terminal session on gnome or file browser or something it always starts in the home directory of another user.

If i do "cd" it jumps back to the home dir correctly.

Any ideas?
 
Old 08-24-2011, 08:32 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Take a look at /etc/passwd -- you've (possibly) re-used the UID (that's the number, not the name).

The fields in /etc/passwd are
  1. login name
  2. optional encrypted password
  3. numerical user ID
  4. numerical group ID
  5. user name or comment field
  6. user home directory
  7. optional user command interpreter
You're looking for two lines with the same numerical user ID (UID) or the same user home directory. They'll be at the end of the file.

Note that your system uses shadow passwords -- there should only be an x in the optional encrypted password field (and don't monkey with it!).

If you do have duplicate entries (as above), you'll need to use the usermod utility to fix the one you just added (leave the old one alone); the "fix" is to change the UID to one that is not used. Most systems start UIDs at 1000 and go up by one for each additional user, so if the duplicate is, say, 1010 and there is not 1011, simply change the new UID to 1011. The user accounts are found at the bottom of /etc/passwd.

Note that you can, if you're careful, manually edit /etc/passwd as root or with sudo. Make a backup copy first, then edit (carefully!) with your favorite text editor.

Also note that if the problem is a duplicate UID and you change the new user UID you will need to run
Code:
chown -R username /home/username
Hope this helps some.
 
Old 08-24-2011, 01:10 PM   #3
event2000
LQ Newbie
 
Registered: Sep 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Ok I will try this, thanks alot!
 
  


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] vsftpd chrooting users that have been jailed into /home/jail/home/$username. amonamarth Linux - Server 4 07-09-2011 06:29 PM
[SOLVED] Lost users after upgrade keeping old /home. Can't re-create users... JZL240I-U Linux - Software 7 05-02-2011 03:43 AM
[SOLVED] Need sudo for users but only +r on other /home/users Ubuntu 10.04 sundry_50 Linux - Security 3 11-07-2010 07:22 PM
In KDE, I can see pics of users when i open up .thumbnails as other users? BajaNick Linux - General 4 02-05-2005 11:21 PM
Konquorer only starts for root and su users kurtjensen Linux - Software 4 01-15-2005 02:06 AM

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

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