LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2008, 09:55 AM   #1
cdriskill
LQ Newbie
 
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
moveing a file to other users.


Hello I am a DB2/DBA trying to set-up my first linux database. In order to get users access I need to move a profile to there accounts. I cannot seem to find the command to move a file from my useried to other userid's, or is there a palce I can put the profile file that all everyone can access when they logon? Any help would be appreicatr
 
Old 09-15-2008, 10:03 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
use the chown command.
type 'man chown' for more information.
If you want a single profile for every user, I suggest /etc
Check that your file is readable by anybody. Type 'man chmod' for more informations.

Last edited by Agrouf; 09-15-2008 at 10:04 AM.
 
Old 09-15-2008, 11:43 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
/etc/skel is a possibly good place to put this sort of file.
See here: http://www.linuxhowtos.org/Tips%20an...using_skel.htm
You will need to be root to be allowed to copy the file there:

Code:
root@server# cp   /home/cdriskill/yourfile   /etc/skel
Make sure the file is owned by root:
Code:
root@server# chown  root:root  /etc/skel/yourfile
and not writeable by others:
Code:
root@server# chmod  644  /etc/skel/yourfile
Then they can copy it to their home directories like this:

Code:
user@server$ cp   /etc/skel/yourfile   ~
(they will then be able to edit their own copy, but not the master one in /etc/skel)

You cannot move a file from your home to another users home, because you do not have permission to do so. You have to do it as root, and then give them ownership of the file if you want them to be able to change it.

Code:
root@server# cp   /home/cdriskill/yourfile   /home/theirusername/
root@server# chown  theirusername:theirusername  /home/theirusername/yourfile
... and welcome to LQ!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Moveing 2000 small business exchange server to suse 10. Chrisww Linux - Server 0 08-30-2007 04:40 AM
Export all users to file pearsont74 Linux - General 3 09-13-2006 01:09 PM
log file for users rockwell_001 Linux - General 1 06-28-2004 02:04 PM
Are 2 users able to access the same file ForumKid Linux - General 5 09-20-2002 03:32 AM
Moveing up and need help Jedi_Cheese Linux - Software 1 01-20-2002 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration