LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-08-2014, 09:03 AM   #1
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Rep: Reputation: 15
Reinstalling Server and same username issue


Hellouu,

I am having a problem with the new centos 6.5 reintallation. I reinstalled linux server on a old hard drive with the folders /var and /home folders already existing, so, in the hard drive there is an user already called "power" on the home folder, but now I need to use the same username where the group id is 500, how can I add the same username to get everything intact (sub folders).

#adduser power???
adduser: user 'power' already exists

would I have to do it manually?

please help
 
Old 05-09-2014, 02:59 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by alejandroye View Post
I reinstalled linux server on a old hard drive with the folders /var and /home folders already existing, so, in the hard drive there is an user already called "power" on the home folder, but now I need to use the same username where the group id is 500, how can I add the same username to get everything intact (sub folders).
there may be better or more elegant methods, but here's what I would do:
  • Rename the existing /home/power to something else
  • Create the user "power", forcing the same uid and gid it used to have (using the --uid and --gid switches with adduser)
  • Log in and out as the new user to finish creation of the new account. That'll create a new /home/power directory.
  • Being root again, delete the newly created /home/power directory and rename the original one back to /home/power.

[X] Doc CPU
 
  


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
[SOLVED] Reinstalling mysql-server problem compunuts Linux - Server 4 04-03-2013 11:40 AM
[SOLVED] I'm using ubuntu on my server - considering switching to debian while reinstalling lenka Linux - Server 3 09-24-2012 03:37 AM
[SOLVED] Reinstalling X server or upgrading it lpallard Slackware 4 09-04-2010 07:56 PM
[SOLVED] NIS with nscd on, username and password caching issue luvshines Linux - Security 3 02-28-2010 11:31 AM
username/password lockout issue dungeonrock Red Hat 9 03-06-2006 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:37 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
Open Source Consulting | Domain Registration