LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 05: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, 09: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,477

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
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, 02:10 PM   #3
event2000
LQ Newbie
 
Registered: Sep 2006
Posts: 11

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:29 PM
[SOLVED] Lost users after upgrade keeping old /home. Can't re-create users... JZL240I-U Linux - Software 7 05-02-2011 04: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 08:22 PM
In KDE, I can see pics of users when i open up .thumbnails as other users? BajaNick Linux - General 4 02-06-2005 12:21 AM
Konquorer only starts for root and su users kurtjensen Linux - Software 4 01-15-2005 03:06 AM


All times are GMT -5. The time now is 08:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration