1753359 Members
4860 Online
108792 Solutions
New Discussion юеВ

Re: tar

 
SOLVED
Go to solution
kunjuttan
Super Advisor

tar

Hi,
I want to make one my user use tar command for backup.How can I able to do that??
8 REPLIES 8
Jupinder Bedi
Respected Contributor

Re: tar

Hi dipesh ,

you can give the access by sudo . install sudo on your system if not installed and than visudo

make the entry and save the file .
Than do su to that particular user and run sudo -l

it will show you that user has access to run tar command


Thats all
All things excellent are as difficult as they are rare
kunjuttan
Super Advisor

Re: tar

Thanks.Can you give me some more information.Is it possible in RHEL?From whre I will get sudo package?Is it free?
Jupinder Bedi
Respected Contributor
Solution

Re: tar

yes this package is 100% free . you can download it from any website. following are the links


http://www.icewalkers.com/Linux/Software/533590/Sudo.html

http://linux.softpedia.com/get/Programming/Widgets/Perl-Modules/Sudo-36009.shtml
All things excellent are as difficult as they are rare
kunjuttan
Super Advisor

Re: tar

after installing what is to be done??visudo??
Jupinder Bedi
Respected Contributor

Re: tar

after installing di visudo and edit the line at bottom

username ALL=(ALL) NOPASSWD: tar
All things excellent are as difficult as they are rare
Steven Schweda
Honored Contributor

Re: tar

I don't use sudo, so I know nothing, but it
seems to me that allowing a non-root user to
run "tar" as root effectively gives that user
read and write access to any file on the
system. If you trust this user so much, then
why not give him the root password?

It might make more sense to write a script
which does some specific (limited) backup
task(s) using "tar", and then allow a
non-root user to run that _script_ as root.
dirk dierickx
Honored Contributor

Re: tar

giving somebody root is crazy, they have _full_ control of the whole system. give them sudo access to tar and they can only do tar as root.

now, you can even configure it so that the user can only create tar packages of a system, and not expand, so reducing the risk of the user overwriting the whole FS etc.

sudo is the way to go. i'm an admin, and i don't even use the root account.
Steven Schweda
Honored Contributor

Re: tar

> [...] giving somebody root is crazy, [...]

I didn't say that it was wise, only that
unrestricted "tar" use is not much different.

> now, you can even configure it [...]

I suggested one way to do that. What's your
suggestion?

> sudo is the way to go. [...]

It's certainly one useful method, when used
properly. When used improperly, its benefits
may be greatly reduced.