Article View: alt.folklore.computers
Article #623822Re: First use of /sbin in Unix?
From: Grant Taylor
Date: Sat, 09 Jun 2018 21:33
Date: Sat, 09 Jun 2018 21:33
104 lines
5630 bytes
5630 bytes
On 06/09/2018 03:18 AM, Jorgen Grahn wrote: > Most of those don't need root privileges for reading (although some Linux > distributions annoyingly put them in /sbin and don't put /sbin in $PATH > for normal users). I think it's useful to have them available and to > know you cannot break anything unless you specifically choose to. I do a LOT of things where I dynamically reconfigure the network or other similar things for virtualization labs. As such, I find that I need write access to ip a LOT. > I'd worry about scripts picking up the wrong copy of ip, netstat and > friends, and run stuff as root (and log a sudo use) when they really > just want read access. Ya. About the only time I've been burned by that is the differences in behavior of running "hostname" with options on Solaris as non-root vs root. Former (silently) fails. Latter changes the system's hostname. > My time to stick my neck out: > > I don't like sudo. I'd much rather su to root in a separate shell, > and carefully do my privileged work there, then log out when I'm done. I can respect that. My biggest issue with that is su requires knowing root's (or the target user's) password. This is okay on a single user machine. This is NOT okay on multi-user systems. This is problematic when you have many different teams that need to administer different parts of the system and all share root's credentials. On the other hand, sudo does NOT need the target user's password (by default). Instead you confirm who you are to sudo and then it allows you to run things. > I don't want dangerous command lines to end up in my shell history, > where I can by accident execute them again and (if I ran sudo recently) > have them execute without warning. Fair. I've mostly gotten numb to that. For better or worse. > Sudo blurs the distinction between me and the root user, it seems to me. Does "su" blur the distinction? Both su and sudo cause commands to be run as a different user (root by default). Or is it the fact that you start a shell as the other user? Be it via "su -" or "sudo -i". Would "sudo -i" be blurry for you? Or is that better because you're in a root shell? > That way I also don't have to understand the sudo config files. Many (if not most) people don't need a super fancy sudoers file. In fact, what most Linux distributions ship with is sufficient. If you're in $GROUP, you can have sudo access. If you work for a company and need something more complex, you'll likely get some training on how to manage the sudoers file. > I was going to mention aliases as an alternative, but that's a valid > point. Aliases are a bit ... unorthogonal. I use a number of aliases. But they tend to be for me being lazy. I.e. alias ag='apt-get' By the way, I've got apt-get working via sudify too. — I frequently install / uninstall things too. ;-) > Yes. I haven't encountered any "false twins" like that in recent decades, > though. Debian Linux (and probably others) has the /etc/alternatives > system for when e.g. you have two different vi clones installed; I use > that one. Ya. I tend to change the editor from nano to vim. > /etc/alternatives is system-global though, so if I was on a multi-user > system where the sysadmin declared that Vim is the right vi and I wanted > nvi instead, I might consider doing what you do. Yep. > Same here, of course! Whatever I write in this thread has a bunch of > "IMHO" and "YMMV" attached to it. ACK > I found it interesting to read about how you structure your environment. :-) -- Grant. . . . unix || die
Technical Details
Message-ID:
<pfhh9q$jsc$1@tncsrv09.home.tnetconsulting.net>Path:
mbox-mo1.pugleaf.net!c20-v6ni1759itc.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED!not-for-mailReferences:
<pf6emc$3h2$1@dont-email.me> <ZzzRC.190248$T14.113297@fx44.iad> <pf7ieq$40p$1@tncsrv09.home.tnetconsulting.net> <20180606103538.7eddd3774f5429f1abd54fc6@eircom.net> <XnsA8F990C4CB379admin127001@85.214.115.223> <pf8vvb$oko$1@tncsrv09.home.tnetconsulting.net> <slrnphgdv7.31ka.grahn+nntp@frailea.sa.invalid> <sfXRC.288871$yc1.96733@fx40.iad> <slrnphi8k3.31ka.grahn+nntp@frailea.sa.invalid> <pfbuep$lb$1@tncsrv09.home.tnetconsulting.net> <slrnphn6rh.31ka.grahn+nntp@frailea.sa.invalid>Show Full Headers
Complete Article Headers
X-Received: by 2002:a6b:dc01:: with SMTP id s1-v6mr5399935ioc.111.1528579934502; Sat, 09 Jun 2018 14:32:14 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:a6b:e318:: with SMTP id u24-v6ls1321897ioc.3.gmail; Sat, 09 Jun 2018 14:32:13 -0700 (PDT) X-Received: by 2002:a6b:9fc4:: with SMTP id i187-v6mr5201597ioe.28.1528579933770; Sat, 09 Jun 2018 14:32:13 -0700 (PDT) Path: mbox-mo1.pugleaf.net!c20-v6ni1759itc.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED!not-for-mail From: Grant Taylor <gta...@tnetconsulting.net> Newsgroups: alt.folklore.computers Subject: Re: First use of /sbin in Unix? Date: Sat, 9 Jun 2018 15:33:10 -0600 Organization: TNet Consulting Lines: 104 Message-ID: <pfhh9q$jsc$1@tncsrv09.home.tnetconsulting.net> References: <pf6emc$3h2$1@dont-email.me> <ZzzRC.190248$T14.113297@fx44.iad> <pf7ieq$40p$1@tncsrv09.home.tnetconsulting.net> <20180606103538.7eddd3774f5429f1abd54fc6@eircom.net> <XnsA8F990C4CB379admin127001@85.214.115.223> <pf8vvb$oko$1@tncsrv09.home.tnetconsulting.net> <slrnphgdv7.31ka.grahn+nntp@frailea.sa.invalid> <sfXRC.288871$yc1.96733@fx40.iad> <slrnphi8k3.31ka.grahn+nntp@frailea.sa.invalid> <pfbuep$lb$1@tncsrv09.home.tnetconsulting.net> <slrnphn6rh.31ka.grahn+nntp@frailea.sa.invalid> NNTP-Posting-Host: alpha.home.tnetconsulting.net Mime-Version: 1.0 X-Trace: tncsrv09.home.tnetconsulting.net 1528580218 20364 198.18.18.251 (9 Jun 2018 21:36:58 GMT) X-Complaints-To: newsm...@tnetconsulting.net NNTP-Posting-Date: Sat, 9 Jun 2018 21:36:58 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 In-Reply-To: <slrnphn6rh.31ka.grahn+nntp@frailea.sa.invalid> Bytes: 5287 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit