LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-28-2007, 04:55 PM   #1
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Rep: Reputation: 16
Problems after changing username


I have changed my username (login which I use to enter Ubuntu) and then I couldn't access my documents from the corresponding link, because it tried to open a folder that didn't exist because

after changing the username, the documents folder name stayed the same.

Then, I used Windows to change that folder name to the new user's name. Then, I could open my documents from the link, but even now, some problems persist:

example - when I open a file from a program, it is automatically redirected to the 1st user name documents folder showing this error:

'The folder contents could not be displayed

error accessing 'file:///home/john/Documents': File not found'

I fear for my system's integrity.
What should I do?

Last edited by 512upload; 11-28-2007 at 05:00 PM.
 
Old 11-28-2007, 05:10 PM   #2
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
Open console and enter following command:

ln -s old_name new_name

It creates a symbolic link between new* and old* directories. By looking at any of them you see the same data.
 
Old 11-29-2007, 03:56 AM   #3
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
What if I would like that only the last name remains with no workarounds?

Is it so difficult to change a username in Ubuntu? In Windows it would be piece of cake.

Thank you.
 
Old 11-29-2007, 05:46 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
It's piece of cake.

You have to use the good tool: usermod.

Did you?

In practice, making complex operations from windows to a disk you also modify in Linux is asking for trouble.
 
Old 11-29-2007, 05:47 AM   #5
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
By the "documents folder" do you mean the link that's on you desktop?

If so, you could just change the link to "/home/new_user/Documents".

I've also found that changing user names sometimes causes problems with permissions, where you have to chown -R the home directory to the new username
 
Old 11-29-2007, 03:43 PM   #6
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
I have never used usermod before.
See? That's why Linux is user-unfriendly. In Windows I wouldn't need to know anything.

'By the "documents folder" do you mean the link that's on you desktop?'

No, the link in the top bar.

'where you have to chown -R the home directory to the new username'

Sorry? Don't know what that means.

Gonna investigate on how to use usermod, thanks.

[edited]

I give up. How do I use 'usermod' for my purpose?

Last edited by 512upload; 11-29-2007 at 03:53 PM.
 
Old 11-30-2007, 07:21 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Usually usermod takes care about modifying permissions in an automatic way. It's the first step to do a clean user name change.

man usermod
man chown
man chmod

This is what was suggested here:
Quote:
'where you have to chown -R the home directory to the new username'
chown -R user:group directory
Will assign the directory ownership for user, group.

I guess you can do this with your wm right click (but needs then to be connected as root..)

Then, you would have to probably rename as you did /home/user -> /home/newuser

And then when you login as new user and it works but still some apps kept old links, it's a case by case study, KDE, gnome are maybe different.
How can you compare with window where you get 2 OS suites in the last 5 years, which have both the same window manager (and that you cannot change).

Also you're not supposed to change username everyday. This is an administrative task, not like playing a divx or something; needs a bit of care.

I would have created a new one (adduser or useradd), moved the data and remove the old one.

You can probably still do it.
 
Old 11-30-2007, 11:24 AM   #8
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Quote:
Originally Posted by nx5000 View Post
Also you're not supposed to change username everyday. This is an administrative task, not like playing a divx or something; needs a bit of care.
Well said.

If you could provide your old username (john?), new username and the output from
Code:
ls -l /home
that might help.
 
Old 11-30-2007, 07:33 PM   #9
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Actually, now that I think about it more, its probably not a permission problem since you say that the link in the "Places" toolbar thingy is incorrect.

I've rebooted in Ubuntu to take a look at things and there doesn't seem to be an easy way to fix this... You can edit applications and system menu, but not the places menu. If these links don't get renamed during a user name change, then this is a serious problem...

Anyone know how to fix this?

PS: If you want to compare Windows to Ubuntu (or linux in general), then compare the price tags as well. If you want to you use linux, then you're going to have to put in a bit of work, you cheap !@#$.
 
Old 11-30-2007, 10:02 PM   #10
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
Quote:
Originally Posted by 512upload View Post
I have never used usermod before.
See? That's why Linux is user-unfriendly. In Windows I wouldn't need to know anything.

'By the "documents folder" do you mean the link that's on you desktop?'

No, the link in the top bar.

'where you have to chown -R the home directory to the new username'

Sorry? Don't know what that means.

Gonna investigate on how to use usermod, thanks.

[edited]

I give up. How do I use 'usermod' for my purpose?
http://linux.oneandoneis2.org/LNW.htm
Linux IS NOT windows
read that before you make accusations
 
Old 11-30-2007, 10:56 PM   #11
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Im thinking this is due to permissions. When you create a new user name in Linux it assumes its a diffrent person so files don't belong to the new user. You could have just copied over all the files from the old home directory into your new one. Also there are several configuration files that get put into your home directory for software that you normally don't see because they are hidden. These files you would not want to move to the new user. Saying its easy to this this sort of thing in windows is actually incorrect unless of course your talking about windows 98 or something. Windows xp uses the same sort of security and trying to do something like this in there would cause the same issues unless of course all your users have admin access a thing that makes having permissions pointless.


Anyone who has had a remote user profile deleted on a domain system and then recovered it knows that windows can actually be harder to do what you are trying to do.


Quote:
example - when I open a file from a program, it is automatically redirected to the 1st user name documents folder showing this error:
This is probably due to you having the same invisible configuration files in that directory.

From what I can understand you probably just need to update some of your links that point to the non existent directory. Need to look for broken links.

Last edited by exvor; 11-30-2007 at 10:59 PM.
 
Old 12-01-2007, 04:18 AM   #12
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
Of course Linux is not Windows. Windows is user-friendlier, for now. Linux might be free, but it still is finacially supported by many companies.

But talking about what matters, gonna try the 'change back to first user, add user, change files do the newer and delete the old' thing, thank you very much. I thought of it before reading that suggestion, but this way I confirm that it's a good try to fix my mess-up.
 
Old 12-01-2007, 05:19 AM   #13
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
BIG PROBLEM

I tried to do it, but now I got the $home/.dmrc and 644 error.
I changed the username to the first (john) and then I had to turn off the computer forcibly by holding the power button for 5 seconds, because only the new username was recognized. Now, either having the username folder named as the first user or the new, I can't login to Ubuntu. I'ts stupid. It seems that commanding username changes in Ubuntu produces different results everytime.

See? This is why I hate Linux, even if I'm still trying to 'migrate spiritually' to it from Windows...

I would be glad that you helped me, cause if you don't, I'll have to reinstall Ubuntu...

Last edited by 512upload; 12-01-2007 at 05:23 AM.
 
Old 12-01-2007, 07:46 AM   #14
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Quote:
Originally Posted by 512upload View Post
See? This is why I hate Linux, even if I'm still trying to 'migrate spiritually' to it from Windows...(
I thought you wanted to stick to "talking about what matters".

This along with your claim that Linux is "supported by many companies" might very well be taken as an insult to those who spend a lot of their personal time trying to develop and improve Linux, and who may otherwise be inclined to help you.

If you want the spiritual experience of being free from Windows, then get a Mac. The marketing/branding folks at the Apple corporation have such an experience already packaged and ready for your enjoyment.

Have a nice day
 
Old 12-01-2007, 08:43 AM   #15
512upload
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 16
"I thought you wanted to stick to "talking about what matters"."

I wrote that in a different post. But, anyway, it matters what I think about Linux. If I get enough sick of it, then I'll take Windows (pirated, by the way).

"This along with your claim that Linux is "supported by many companies" might very well be taken as an insult to those who spend a lot of their personal time trying to develop and improve Linux, and who may otherwise be inclined to help you."

No, it can't. You're just proving my point that Linux should be better by now, having both many companies supporting it and many people working for it for free.

Mac is not free. And the freeness of Linux is the only thing that attaches me to Linux, for now; since the user experience doesn't.

Last edited by 512upload; 12-01-2007 at 08:45 AM.
 
  


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
changing my username IndianMaverick LQ Suggestions & Feedback 6 08-21-2006 09:46 PM
changing username Slagazor Linux - Newbie 4 04-18-2005 03:37 PM
Changing LQ username? ksgill LQ Suggestions & Feedback 3 03-06-2005 02:44 PM
Changing username Kramon Mandriva 1 11-24-2003 08:04 PM
changing username evil_lafta Slackware 3 01-15-2003 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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