<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 13 Aug 2019, at 9:03 am, Christopher Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk" class="">jonesc@hep.phy.cam.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 12 Aug 2019, at 9:40 pm, Gerben Wierda <<a href="mailto:gerben.wierda@rna.nl" class="">gerben.wierda@rna.nl</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">As I’m working my way to somewhat knowing what I’m doing, I have a question.</div><div class=""><br class=""></div><div class="">I always set the timeout on sudo on my systems to 0 seconds. So, for every sudo command I enter, I have to type the password. This is somewhat safer than having a timeout (normally 300sec).</div></div></div></blockquote><div class=""><br class=""></div><div class="">What I do is allow ${prefix}/bin/port to run through sudo without requiring a password. you can do this by adding</div><div class=""><br class=""></div><div class="">chris   ALL=(ALL) NOPASSWD: /opt/local/bin/port</div></div></div></div></blockquote><div><br class=""></div><div>should have added here the above is added via ‘visudo'</div><div><br class=""></div>Chris</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><br class=""></div><div class="">this in my opinion has two advantages</div><div class=""><br class=""></div><div class="">1. I never have to type my passport for running port</div><div class="">2. Because of 1., sudo never fully authenticates, so if I was to run another command through sudo immediately after port, that command will ask for my password.</div><div class=""><br class=""></div><div class="">In my view, the above is more convenient, and also safer against my accidental bad usage of sudo.</div><div class=""><br class=""></div><div class="">Chris</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">This becomes tedious when there are many sudo commands to perform, so in that case, I often revert to running sudo -s or sudo -i, do my work as root and kill the subshell. This has risks too (e.g. doing a wrong rm command, but I’m pretty paranoiac about stuff like rm)</div><div class=""><br class=""></div><div class="">For my first steps with macports, I’ve run everything as root that way, because I expected there would be changes in /Library/LaunchDaemons etc and I did not want toe be typing my password all the time.</div><div class=""><br class=""></div><div class="">But I’m wondering if I should move back to running everything as ordinary user.</div><div class=""><br class=""></div><div class="">Are there disadvantages to running to port commands as root?</div><div class=""><br class=""></div><div class="">If I want to revert, what should I chown to that user? How should ownership in /opt be?</div><br class=""><div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Gerben Wierda</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://enterprisechess.com/" class="">Chess and the Art of Enterprise Architecture</a></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://masteringarchimate.com/" class="">Mastering ArchiMate</a></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://www.infoworld.com/blog/architecture-for-real-enterprises/" class="">Architecture for Real Enterprises</a> at InfoWorld</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://eapj.org/on-slippery-ice/" class="">On Slippery Ice</a> at EAPJ</div></div>
</div>
<br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>