On Sat, 26 Aug 2006, in the Usenet newsgroup comp.os.linux.misc, in article
<44f011df$0$75034$***@news.sunsite.dk>, Angel Tsankov wrote:
[Note: comp.os.linux.help and comp.os.linux.questions are bogus groups,
only carried on mis-configured news servers. 'comp.os.linux.help' was
renamed 'comp.os.linux.misc' in 1994.]
Post by Angel TsankovA lot of small pieces of a long bash script need to be executed as
different users. How can I most easily accomplish this task?
I assume you have looked at _group_ permissions and decided that running
the script as a group member isn't going to do the job.
[compton ~]$ whatis su
su (1) - run a shell with substitute user and group IDs
[compton ~]$
specifically, the 'su -c' option. To "run as" other users, _without_
supplying a password, this script would have to be run by root. Otherwise
the individual passwords need to be included on the 'su' invocations,
which is a large security problem.
Old guy