Copying the .profile of one user to another. | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Copying the .profile of one user to another.

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-06-2012
Laxxi Laxxi is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 29 April 2013, 9:17 AM EDT
Posts: 22
Thanks: 12
Thanked 0 Times in 0 Posts
Copying the .profile of one user to another.

I want to copy .Profile file from user1 homedirectoryto user2 homedirectory in Aix.
Please help me with the process.

Last edited by Scott; 12-06-2012 at 08:15 AM.. Reason: Moved thread from AIX sub forum
Sponsored Links
    #2  
Old 12-06-2012
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 16 April 2014, 6:02 AM EDT
Location: in der Schweiz
Posts: 8,322
Thanks: 312
Thanked 1,013 Times in 886 Posts

Code:
cp /home/users/user1/.profile /home/users/user2/.profile

or

Code:
cp ~user1/.profile ~user2


Last edited by Scott; 12-06-2012 at 08:17 AM.. Reason: Added "or" part
Sponsored Links
    #3  
Old 12-06-2012
jyoung jyoung is offline
Registered User
 
Join Date: Nov 2001
Last Activity: 20 March 2014, 8:17 AM EDT
Location: Flint, MI
Posts: 262
Thanks: 0
Thanked 4 Times in 4 Posts
You might also want to use the chown command to change the ownership of the profile once it is copied to the new home directory. You may also have to use the chgrp command if the group is different.
The Following User Says Thank You to jyoung For This Useful Post:
Laxxi (12-07-2012)
    #4  
Old 12-06-2012
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 16 April 2014, 6:02 AM EDT
Location: in der Schweiz
Posts: 8,322
Thanks: 312
Thanked 1,013 Times in 886 Posts
That would only be necessary (possible, even) if the user doing the copying was root.

I'm guessing that the O/P is not root.
The Following User Says Thank You to Scott For This Useful Post:
Laxxi (12-07-2012)
Sponsored Links
    #5  
Old 12-06-2012
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 7 April 2014, 4:11 PM EDT
Posts: 324
Thanks: 12
Thanked 40 Times in 38 Posts
If you can't copy the file due to permissions, then you can try this. If user1 wants the .profile form user2, then do this. If user1 can open the user2's .profile file with more or cat then you can past the contents of the into vi, then you vi user1's .profile.
The Following User Says Thank You to bitlord For This Useful Post:
Laxxi (12-07-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
trap in etc/profile and user .profile Smith Infrastructure Monitoring 4 09-01-2009 08:58 PM
How can I find a user profile darwinscp@hotma UNIX for Dummies Questions & Answers 2 04-15-2008 04:47 PM
copying .profile files to a new server (SCO) sighbrrguy UNIX for Dummies Questions & Answers 2 12-05-2007 02:02 PM
User Profile gagasan_makmur UNIX for Dummies Questions & Answers 2 07-11-2006 02:01 AM
User profile ust Shell Programming and Scripting 1 02-25-2005 03:42 PM



All times are GMT -4. The time now is 08:57 AM.