Page 2 of 2
Re: root
Posted: 14. Jun 2012, 18:51
by salix555
So I've decided to move to Salix from PCL.
I plan to leave the a /home partition as was - with an existing user account prior to Salix install.
When I install Salix, I create a user account then once up and running, I want to move the content of the original user account to the new account and give the user rights to the content?
Whats the su / sudo syntax for this?
Re: root
Posted: 14. Jun 2012, 19:48
by Tideflat
If you know how do to it from the command line, then just doing "su", and continuing as if you logged in as root would work, but I have no idea if that would be the suggested way to do it.
(Note that this post was made a an inexperienced person as may contain errors.)
Re: root
Posted: 14. Jun 2012, 21:15
by toothandnail
salix555 wrote:So I've decided to move to Salix from PCL.
I plan to leave the a /home partition as was - with an existing user account prior to Salix install.
When I install Salix, I create a user account then once up and running, I want to move the content of the original user account to the new account and give the user rights to the content?
Whats the su / sudo syntax for this?
I'm not familiar with PCL. However, the majority of Linux distributions use a starting UID of 1000 (Red Hat and its derivatives use 500, but they are the exception, AFAIK). So long as PCL uses a starting UID of 1000 (and you only have a single user defined for both PCL and Salix), you should be able to access the old user files logged in as your new Salix user. Moving data that way would be a good deal safer than using the root account to do so. If you use the root account, it is possible to leave files with their ownership set to the root ID, which will cause you a lot of problems.
You need to be careful not to move data which relates to things like desktop setup - there is a very good chance that the data will not be compatible with the desktop setup used in Salix.
Paul.
Re: root
Posted: 14. Jun 2012, 21:22
by gapan
Safest way to handle this:
During salix installation, create a user with exactly the same username as the one you had in your previous distribution. Your files will stay intact (careful not to choose to format your /home partition), only a few settings files (like xfce panel settings for example) will be turned to the salix defaults. You'll be able to log in normally with that user after that. Some of your documents might have a different UID or GID than your current user, so you can just run:
Code: Select all
$ su
# chown -R yourusername:users /home/yourusername
replacing "yourusername" with your actual username. The "users" part is the default group and should stay that way.
Re: root
Posted: 17. Jun 2012, 20:45
by bklive
mark post as solved? since both issues were solved?
Re: root
Posted: 17. Jun 2012, 21:42
by Shador
gapan wrote:create a user with exactly the same username as the one you had in your previous distribution.
Actually the username does not matter at all. Just the UID needs to be exactly the same. If that's the case files owned by user myuser with e.g. uid 1000, show up in another installation as user anotheruser, if that anotheruser also has the uid 1000. The user name is just a human readable alias, but internally (for permissions) just the uid matters. It's the same with groups and gid.
Re: root
Posted: 18. Jun 2012, 07:31
by thenktor
Usually the username is also the name for your home directory and therefore it matters. Of course you can chose a new username and just rename your home directory. But then you have to take care about the default settings that are initialized at installation time.
Re: root
Posted: 18. Jun 2012, 20:16
by Shador
thenktor wrote:Usually the username is also the name for your home directory and therefore it matters. Of course you can chose a new username and just rename your home directory. But then you have to take care about the default settings that are initialized at installation time.
Yes, I forgot to mention that. But as you said that's easy to solve by either changing the home directory path of the user or setting up a symlink. The permissions are the bigger problem.
Apart from that the cli user management tools allow you to chang the home directory when creating a user and thus initializes the settings right. Permissions are not so easy to get around or they shouldn't be at least.
