[...]
Sorry about the implied insult about our relative ages. To put that in perspective, there is a now 7 year old pix & my better half on my web page at:
<http://gene.homelinux.net:85/gene>
I have too damned many hobbies if you look around...
>I had tried some time ago to make use of SA, but gave up as it did not seem worth the effort.
Its a bit difficult to get setup initially because it needs to be trained with at least 200 examples of ham, and 200 example of spam before it actually starts working
TBT, I occasionally cheat on the training, and just have it go over a kmail cur directory that contains a few thousand known good messages. Spam OTOH, is in somewhat shorter supply, so I have manually moved the spam that does get through to a spam dir, and (I'm a lazy old fart) a cron script sends sa-learn --spam after that directory about noonish every day, so it gets another 3-6 messages to look at and learn from a day. In procmail, which I use for the MTA, anything that comes back from an SA scan with 7 *'s or more gets a free ride to /.dev/null so that collects the gross majority of it right there. Then kmail is trained to send anything with 5 *'s to the Trash dir and mark it unread, so I can look at the borderline cases and move it to either the ham dir or the spam dir for sa-learns next run. The script that drives sa-learn also deletes the spam once its look at it, but leaves the ham so I can move it back to wherever. Once its running, its maybe a 30 seconds a day job for me to drag & drop. Easy maintenance IMO.
And FWIW, since I made those changes in the rules shown a couple of messages back, I have not had a hit on that rule, which subtracts 3.2 points from otherwise good mail.
>As you know PCLOS does not use by default 'sudo' which is what stood out to me. For anyone else reading ......
Oh? I guess I am a power user then. ;-)
>su <user> will switch to the specified user while remaining in the present directory.
I did not find that to be the case as it was reverting to that users home dir even w/o the dash, plus I needed an su that died at the end of the command. Hence the sudo.
>su - <user> will switch to specified user and change directory to the user's /home (~)
Yes. And remain at that user. Is there an exit strategy? su'ing back to root from an su user seems like a waste of stack space if nothing else. ISTR it also asked for the root pw, and that is a showstopper for a script.
>The same applies to all users including root.
I did not find that to be the case at all, as shown by the relative diffs in the env's displayed when I was troubleshooting why a nearly 10 year old build/install script for amanda was failing on pclos, but maybe I didn't try your method either. And short term memory (2-3 days) is still clear, 6 months ago is hazy, and 40 years ago is still clear, goes with the age they keep telling me. ;-)
The problem in writing an amanda build and install script is that you actually need two scripts, one of which, the configure and build script, MUST be run by the user, taking a tsk tsk exit if root attempts to run it. In fact, part of amandas security model is no more privs that it needs to do the job, and root actually can't run it. I use the scripts because there is a list of build options I use that are dead consistent and not dependent on my wet ram. ;-)
But, because the "sudo user cd subdir" is local to that invocation of sudo, (The su or sudo user was putting that user back in the ~ directory and the script it needed to exec (the master copy does exist there too) was not finding any of its resources, I had to combine the cd and script execution within a single instance of sudo. When the subscript is finished, then the environment of root, already cd'd to that directory, is restored, and then root can do the make install portion and get all the perms set correctly.
Hopefully that is a clear description of the flow. I have been playing canary in the coal mine for amanda for almost 12 years, running the almost daily snapshots and reporting any errors back to the amanda list, hopefully before it bites a major user such as the NY State Dept of Health, who for obvious reasons run somewhat older, known stable versions. And they are known stable because of a couple of old hand users like me who aren't afraid to lose a little blood once in a while. I try to keep mental band-aids handy. ;-)
Thanks Just19
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Question: Is it better to abide by the rules until they're changed or
help speed the change by breaking them?