Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.