LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-22-2015, 08:01 PM   #1
mtdew3q
Member
 
Registered: Mar 2006
Location: upstate NY
Distribution: fedora XFCE 24
Posts: 376

Rep: Reputation: 17
changing user name slight hangup


hi-

Today I switched my linux username and changed to /home/newname. I am doing this because it is not secure to broadcast your username to the world.

At this link:

http://askubuntu.com/questions/34074...ge-my-username

I am wondering if there is a way to do it a little better for me.

Quote:
You can either keep a symlink for backward compatibility, e g ln -s /home/newname /home/oldname or you can change the file contents with sed -i.bak 's/*oldname*/*newname*/g' *list of files* It creates a backup for each file with a .bak extension.
I tried to do a symlink.

It is not working exactly the way I had hoped. I may not understand it.

When I do the command ls -l I had to make an alias command with awk to parse out the user when i display it. That isn't a big deal but I noticed the oldname and newname are in the printout before filtering it with awk.

Also, my old home directory (the one that matches my /home/oldname is not deleted).

I can log in and the desktop looks fine. I indeed have a new /home/newname.

At one point can I delete the /home/oldname.

Is it okay that ls -l is picking up both usernames (new and old) in separate columns?

I wanted to bounce this off a more experienced user to see if there are some minor adjustments I can do to improve not having 2 home directories and if it is okay for ls -l to display both the old and new user name.

thanks!

mtdew3q
 
Old 02-22-2015, 08:15 PM   #2
mtdew3q
Member
 
Registered: Mar 2006
Location: upstate NY
Distribution: fedora XFCE 24
Posts: 376

Original Poster
Rep: Reputation: 17
HI-

I just right clicked the old directory name and it isn't taking up space. I thought I had two exact copies of directories with different names.

Sorry....
 
  


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
Need quick answer. Changing user directory and changing it to /bin/bash jinsu88 Linux - Newbie 1 01-21-2014 09:34 PM
changing user to root user in obuntu 10.04lts kato.jacob Linux - Newbie 6 06-28-2011 08:28 AM
changing home directory permission in user management after user created in suse(KDE) hamedhsn Linux - Security 4 04-06-2011 10:18 PM
User friendly message to user on password changing tanveer Linux - General 2 02-24-2009 08:56 AM
su user = server hangup AndrewJR Linux - General 1 10-04-2003 08:14 AM

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

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