Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Installation and Live Media
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th May 2004, 09:46 PM
chewmanfoo Offline
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?
Reply With Quote
  #2  
Old 27th May 2004, 11:07 PM
ghenry's Avatar
ghenry Offline
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
Reply With Quote
  #3  
Old 27th May 2004, 11:31 PM
jimbo's Avatar
jimbo Offline
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.
Reply With Quote
  #4  
Old 27th May 2004, 11:44 PM
ghenry's Avatar
ghenry Offline
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
Reply With Quote
  #5  
Old 28th May 2004, 01:00 PM
chewmanfoo Offline
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?
Reply With Quote
  #6  
Old 28th May 2004, 11:41 PM
boyzonder Offline
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 :-)
Reply With Quote
  #7  
Old 29th May 2004, 01:06 PM
chewmanfoo Offline
Registered User
 
Join Date: May 2004
Age: 40
Posts: 5
All replys were on topic, to the point, and excellent solutions

Thanks guys, really.
Reply With Quote
Reply

Tags
admin, command, copy, guru, redhat or fedora, sys, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can "stock" Fedora copy partitions from command line? joe.pelayo Using Fedora 10 31st May 2009 04:57 AM
Dear Fedora Guru's (Need Help in Compiz) icontrol Using Fedora 7 27th December 2007 03:23 PM
Fedora Guru's wrightdavip Fedora Focus 17 21st February 2005 12:12 AM


Current GMT-time: 20:49 (Tuesday, 18-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat