- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Prblm in Delegation of Rights ... Plz help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2004 05:10 PM
09-09-2004 05:10 PM
there is an ordinary user named 'marshall'. i want, even have to give marshall backup rights, i.e. he can take backup of ANY files/folder in the /home and /opt directories.
Any1 can plz let me know what I have to wirte in /etc/sudoers, to acheive the task, i mentioned above
Thanks in Advance
Best Regards
Maaz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2004 06:08 PM
09-09-2004 06:08 PM
SolutionEdit the /etc/sudoers using "visudo"
#visudo
Place and entry
marshall hostname= NOPASSWD: /bin/cp -R /home /home/marshal/homedirbackup
marshall hostname= NOPASSWD: /bin/cp -R /opt /home/marshal/optdirbackup
And save the entry. Now execute as
#sudo /bin/cp -R /home /home/marshal/homedirbackup
#/bin/cp -R /opt /home/marshal/optdirbackup
Now you can be able to copy all the entries of home and /opt directories
Note: Change the hostname to your hostname. The permissions of the copied file will be same as the original files.
Regards,
Senthil Murugan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2004 06:15 PM
09-09-2004 06:15 PM
Re: Prblm in Delegation of Rights ... Plz help
For the previous reply the, owner of the copied file will be "root" only .To preserve the file permissions use "-p" option with the cp command
Regards,
Senthil Murugan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2004 03:42 PM
09-10-2004 03:42 PM
Re: Prblm in Delegation of Rights ... Plz help
Actually there is a switch to cp that is even better for backup/archive jobs than -p:
-a or --archive (same as -dpR)
==================================
-d same as --no-dereference -- preserve=link
-p same as --preserve=mode,ownership,timestamps
-R, -r, --recursive
copy directories recursively
==================================
HTH,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2004 05:14 PM
09-10-2004 05:14 PM
Re: Prblm in Delegation of Rights ... Plz help
I m highly Thankful to u, for ur kind support.
U have solved my prblm
following line, i add in the /etc/sudoers
marshall CRM1 = NOPASSWD: /bin/tar -cpvf /home/marshal/* /opt
marshall CRM1 = NOPASSWD: /bin/tar -cpvf /home/marshal/* /home and its working 100%.
Again Many Thanks
And Ross Minkov, thanks for ur asistance as well. I higly apprecitae ur's suggestion
Best Regards
Maaz