 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

27th May 2004, 09:46 PM
|
|
Registered User
|
|
Join Date: May 2004
Age: 40
Posts: 5

|
|
|
SYS ADMIN GURU'S: Is there a command on Redhat/fedora to copy a user?
I have a user I want to copy exactly - so that I may grant another the privs/access of my user, but not have to share my password with them. How can I do this? Is there a copyuser command or some equivalent?
|

27th May 2004, 11:07 PM
|
 |
Retired Community Manager
|
|
Join Date: Mar 2004
Location: Scotland
Age: 35
Posts: 1,019

|
|
|
What about using system-config-users gui and looking at the properties and then copying them?
The other way is to use a script and copy them that way.
__________________
http://blog.suretecsystems.com
|

27th May 2004, 11:31 PM
|
 |
Registered User
|
|
Join Date: May 2004
Location: Seattle
Posts: 77

|
|
|
The best way to manage how user settings are created when adding a new user is to make use of the /etc/skel method. Files copied into /etc/skel will be added to the new user's home directory when he/she is created. This is a good place to put a "Desktop" diretory. You can also put things like .profile or .bashrc files or even .kde or .nautilus configuration directories.
You should use caution however as anything you put there is copied to each new user's home directory and if you've got a reference to, say, a specific user's file structure you will get permission errors as user jane can't access user joe's home directory. So make sure of what you are putting into /etc/skel so everything is somewhat generic and files that are referenced, such as corporate wallpapers and such are in a location that is readable by all.
I usually create a "sample" user so I can go into a clean default user environment and setup the applications and desktop etc. how I like it and then copy it to /etc/skel. Of course I then delete the "sample" user.
You can google for "/etc/skel" for more info.
PS. /etc/skel is empty by default.
Last edited by jimbo; 28th May 2004 at 12:10 AM.
|

27th May 2004, 11:44 PM
|
 |
Retired Community Manager
|
|
Join Date: Mar 2004
Location: Scotland
Age: 35
Posts: 1,019

|
|
|
Ah, I picked up on the question wrong, this is of course the correct way to do things.
__________________
http://blog.suretecsystems.com
|

28th May 2004, 01:00 PM
|
|
Registered User
|
|
Join Date: May 2004
Age: 40
Posts: 5

|
|
|
OK, /etc/skel is indeed useful, but really...
I need to duplicate a particular user. Can this be done? From the command line?
|

28th May 2004, 11:41 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 79

|
|
|
How about first adding the user to your to-be-installed-on system. Then (as root) copy the user's directory (found in /home/$user) from the old system to /home/$user on the new system. You could use Midnight Commander (mc) for this, or a command line like this:
cp -bir $old_userhome $new_userhome
(-bir makes sure that all files/directories get copied and that you're prompted for overwrites, the variables $old_userhome and $new_userhome of course should be pointing to real directories).
You probably will get prompted if you wish to overwrite some files. Do this only if you're sure you need the old ones! Using old configuration files which are not compatible with newer software versions might cause trouble.
Finally, as root, make your new user the owner of all files in his home directory. If your user was called "john" and were in the group "users", then you'd say:
chown john.users /home/john -R
This would make john.users the owner of all files and subdirectories of /home/john.
Hope this answers your question!
(and hope it works :-)
|

29th May 2004, 01:06 PM
|
|
Registered User
|
|
Join Date: May 2004
Age: 40
Posts: 5

|
|
|
All replys were on topic, to the point, and excellent solutions
Thanks guys, really.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 20:49 (Tuesday, 18-06-2013)
|
|
 |
 |
 |
 |
|
|