[opensuse] how to write a script
I want a script that does this as a user: rcalsasound restart tuxtype What chance do I stand without having to set sudo on 20 clients? Cheers, Steve. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 primm wrote:
I want a script that does this as a user:
rcalsasound restart tuxtype
What chance do I stand without having to set sudo on 20 clients?
Cheers, Steve.
Some... With bash directly depends how twitchy these are about being run by a script with root SUID set (how twitchy you are about setting up such a script :-) ) and how twitchy the OS is about running such scripts... An alternative 1 is a Perl client/server setup (client asks for command to be run, server daemon runs it)... Or alternative 2 set up a root cron script which checks for a condition or a file dropped in a particular location and runs the commands... User script creates file if file approach is used, cron script clears file if command runs successfully... very crude and not very clever, but usually effective if it is only one user per client... - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHPs3MasN0sSnLmgIRAiF4AKCjdqtt+QWS+zA6nSNHMS7uZp3TdACfeRJp MQ2kowathdP7lGOV8/lPyaQ= =rWn0 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 2007-11-17 at 11:00 +0100, primm wrote:
I want a script that does this as a user:
rcalsasound restart tuxtype
What chance do I stand without having to set sudo on 20 clients?
Cheers, Steve.
What about setting sudo to @group rather than 20 users? -- ---Bryen--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 17 November 2007 11:00:58 primm wrote:
I want a script that does this as a user:
rcalsasound restart tuxtype
What chance do I stand without having to set sudo on 20 clients?
Why? What's the reason for needing to restart alsasound? Sounds like it would be a better approach to fix the problem that leads you to think you need to do that all the time, rather than giving root authority to all the users Anders -- Madness takes its toll -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
primm wrote:
I want a script that does this as a user:
rcalsasound restart tuxtype
What chance do I stand without having to set sudo on 20 clients?
Why not? vi myscript.sh chmod 755 myscript.sh visudo for i in `cat client_list` do scp /etc/sudoers root@${i}:/etc scp myscript.sh root@${i}:/usr/local/bin done -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Anders Johansson
-
Bryen
-
G T Smith
-
Joe Sloan
-
primm