Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

how to change the user name?

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
totencham
Apprentice
Apprentice
User avatar
Posts: 299
Joined: Sun Dec 05, 2004 10:00 am
Location: Szczecin, Poland

how to change the user name?

  • Quote

Post by totencham » Mon Apr 11, 2005 3:11 pm

Is it possible to change the name of my system's user? I don't like my current one anymore.
http://gentoo-wiki.com/HOWTO_Index
cd /usr/src/linux && egrep -ir "( fuck)|( shit)" *
Linux registered user #376896
Top
r00tzz
Apprentice
Apprentice
User avatar
Posts: 203
Joined: Fri Apr 09, 2004 3:03 pm
Location: Sao Paulo, Brasil

  • Quote

Post by r00tzz » Mon Apr 11, 2005 3:13 pm

Don't know, but why don't you simply do an

Code: Select all

adduser new_name
and move everything your user have there??
Top
BlackEdder
Advocate
Advocate
User avatar
Posts: 2588
Joined: Mon Apr 26, 2004 8:47 am
Location: Dutch enclave in Egham, UK
Contact:
Contact BlackEdder
Website

  • Quote

Post by BlackEdder » Mon Apr 11, 2005 3:17 pm

Code: Select all

usermod -d /home/newname -m -l newname oldname
Or if you don't want/need to change the home dir just

Code: Select all

usermod -l newname oldname
See man usermod for more details
Top
zieloo
Veteran
Veteran
User avatar
Posts: 1337
Joined: Sun Mar 28, 2004 6:51 pm

  • Quote

Post by zieloo » Mon Apr 11, 2005 3:18 pm

Shoulda think about it before:P

Now, more seriously.
Do:

Code: Select all

cat /etc/passwd | grep NAME
as root to see what uid (user number) is assigned to your account.

Then delete this user by typing:

Code: Select all

userdel NAME
And create a new accout:
useradd NEW_NAME -u <your_previous_uid>

From man usermod:
-u uid The numerical value of the user's ID. This value must be unique,
unless the -o option is used. The value must be non-negative.
Values between 0 and 99 are typically reserved for system
accounts. Any files which the user owns and which are located in
the directory tree rooted at the user's home directory will have
the file user ID changed automatically. Files outside of the
user's home directory must be altered manually.
This should work but I cannot guaratee - I not that hardcored to change a user's name:D
If you loose access to your own files (!), type:

Code: Select all

chown NEW_USER -R /home/NEW_USER
Oh - yes, good to create, or at least rename your current home dir.

Maybe I forgot about sth (like usual). If you experience any troubles I'm willing to help:).
Top
totencham
Apprentice
Apprentice
User avatar
Posts: 299
Joined: Sun Dec 05, 2004 10:00 am
Location: Szczecin, Poland

  • Quote

Post by totencham » Mon Apr 18, 2005 6:46 am

Thanks! I did the 'usermod -d /home/newname -m -l newname oldname' version and works fine, except some settings in some apps, but I've already changed/repaired them. Big thanks once more!
http://gentoo-wiki.com/HOWTO_Index
cd /usr/src/linux && egrep -ir "( fuck)|( shit)" *
Linux registered user #376896
Top
zieloo
Veteran
Veteran
User avatar
Posts: 1337
Joined: Sun Mar 28, 2004 6:51 pm

  • Quote

Post by zieloo » Mon Apr 18, 2005 7:40 am

totencham wrote:Thanks! I did the 'usermod -d /home/newname -m -l newname oldname' version and works fine, except some settings in some apps, but I've already changed/repaired them. Big thanks once more!
Is my solution too complex? :?
Ok, tell us, what's the new user's name?:D
Top
totencham
Apprentice
Apprentice
User avatar
Posts: 299
Joined: Sun Dec 05, 2004 10:00 am
Location: Szczecin, Poland

  • Quote

Post by totencham » Tue Apr 19, 2005 11:34 am

I used to have my user's name like my name is (nothing special). Now it is "kalarepa" (kohlrabi in english. It sounds really funny in my language :D ). I've also change my hostname to "warzywniak" (something like greengroucer's in english). Now both user's name and hostname suits each other :D .
http://gentoo-wiki.com/HOWTO_Index
cd /usr/src/linux && egrep -ir "( fuck)|( shit)" *
Linux registered user #376896
Top
zieloo
Veteran
Veteran
User avatar
Posts: 1337
Joined: Sun Mar 28, 2004 6:51 pm

  • Quote

Post by zieloo » Tue Apr 19, 2005 7:50 pm

Big, fat LOL:lol:
Top
Post Reply

8 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic