Tags:
create new tag
, view all tags
See AboutThesePages.

Contents

Notes

Subject: Re: [newbie] changing UID name?
   Date: Thu, 13 Jun 2002 23:28:13 -0500
   From: Michael Viron <mviron@findaschool.org>
     To: newbie@linux-mandrake.com

>i just mistakenly added a user with an incorrect logon. I think I changed
>that. Her logon and home directory are correctly named now but I notice
>that when I look at /etc/group, where I added her to a group I created, it
>also shows her listed up above with only the original logon name. Also
>there is only one UID for her listed and it is listed with her original
>logon name. In other words, I do not have everything changed over to her
>new logon. How can I change her UID to her new logon name so it shows up
>consistently everywhere?
>
>And what are some commands that I can use to see that all this info
>associated with her logon is correct?

The easiest way is to take a look at /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow.

In order to correctly switch everything over, you will have to remove the original login, either via the command line (ie, vi / joe / emacs, etc), or via a GUI based administration tool (such as linuxconf, userdrake, etc).

It sounds like you added another separate user, rather than editing the existing user account. If that's the case the above method will work.

If you do not have an entry in /etc/passwd for her current (correct login), you'll have to add that, as well as add her to any groups she was part of before.

In the future, if you need to make changes to their username (login) or to their home directory, it is much easier to do something along these lines:

  1. As root, move their existing home directory to the new username. (ie, if you are changing it from bharris to bcarter, you'd do "cd /home", then type "mv bharris bcarter" (without the quotes)
  2. Next, you'd edit the line in passwd for bharris, changing bharris to bcarter and changing the home directory
  3. Change the line in /etc/shadow.
  4. Change anything necessary in /etc/group and /etc/gshadow.

<Currently, no significant content below this line.>

Resources

See ResourceRecommendations. Feel free to add additional resources to these lists, but please follow the guidelines on ResourceRecommendations including ResourceRecommendations#Guidelines_for_Rating_Resources.

Recommended

  • (rhk) [[][]] --

Recommended for Specific Needs

  • (rhk) [[][]] --

Recommended by Others

  • (rhk) [[][]] --

No Recommendation

  • (rhk) [[][]] --

Not Recommended

  • (rhk) [[][]] --

Contributors

  • () RandyKramer - 18 Jul 2002
  • <If you edit this page: add your name here; move this to the next line; and include your comment marker (initials), if you have created one, in parenthesis before your WikiName.>

[[Main.RandyKramer#18 Jul 2002][]]

Page Ratings

Topic revision: r1 - 2002-07-18 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look