Re: Sudo from scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jerry Feldman wrote:
> On 11/08/2008 10:43 AM, Todd Zullinger wrote:
>> Jerry Feldman wrote:
>>   
>>> Over the years I have used sudo from some of my scripts (RHEL 3 and
>>> 4,  SuSE (5-11), but I found in Fedora 9 (and CentOS 5.2) that sudo
>>> will fail:
>>>
>>> sudo: sorry, you must have a tty to run sudo
>>>
>>> In this particular case it was run on a CentOS 5.2 system, but I had
>>> the same issue with Fedora 9. In both cases the user account was set
>>> to NOPASSWD. Actually, on my home system it was my nightly backup
>>> script I run from my crontab.

jerry,

as a question of curiousness, and 'wat' from svr5 days, have you tried
giving ownership of script to root?

also, if you want backup to run only after you are logged off, or after
you have done something needing backup, have script check for 'filename'
and then delete 'filename' as part of closing. this way, you can run
'touch filename' to enable.

or follow as todd suggested.
- --
peace out.

tc,hago.

g
.

in a free world without fences, who needs gates.

learn linux:
'Rute User's Tutorial and Exposition'   http://rute.2038bug.com/index.html.gz
'The Linux Documentation Project'   http://www.tldp.org/
'LDP HOWTO-index'   http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html
'HowtoForge'   http://howtoforge.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFJIQWJ+C4Bj9Rkw/wRAiMCAJ9KT6Ul3CHTN6iL/h3sitODiOxlnACgslb5
U99ENlrBzSCeZ8jaglE1PPA=
=8NUj
-----END PGP SIGNATURE-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux