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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux