Path: ...!feeds.phibee-telecom.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: candycanearter07 Newsgroups: comp.os.linux.misc Subject: Re: Yet Another New systemd Feature Date: Thu, 9 May 2024 17:20:07 -0000 (UTC) Organization: the-candyden-of-code Lines: 34 Message-ID: References: <4ffbcb1a-6f98-328e-7854-e2a42caeca75@example.net> Injection-Date: Thu, 09 May 2024 19:20:08 +0200 (CEST) Injection-Info: dont-email.me; posting-host="66a87544313f6736c2791b88dd146fc2"; logging-data="835068"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+iqbGoYM8HLrNxFGP8QpihdbPtRJzZ7giQkDjQbisP8w==" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:h0zfBD/Mpy9UoLC8lpdHzkp7g1w= X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]% b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx `~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e ZrQsWJ >|l^I_[pbsIqwoz.WGA] wrote at 01:31 this Thursday (GMT): > On 5/8/24 13:32, Carlos E.R. wrote: >> Mmm? What is the advantage? > > It really depends on what command you do use and what the target user's > account is configured with. > > `sudo -i` starts the target user's login shell directly. So it might be > comparable to `sudo bash` if the target user's shell is bash, but will > be different if the target user doesn't have bash as their default shell. > > I have aliases `si` to `sudo -i` and `s` to `sudo`. So `si` and `s` are > shorter to type and I prefer them. > >> I also don't know about it. Why should I use it? > > I went on a bit of an embrace and extend sudo to make it streamlined for > the environments that I work in. > > I've also configured sudo on my personal systems to be able to > authenticate to sudo with my ssh key. > > I've also created a wrapper that I have in my ~/bin directory that keys > off of $0 as to what command to pass to sudo. So I have ~/bin/ifconfig > -> ~/bin/sudo.wrapper so that I can simply type `ifconfig` as my user > and it's run with sudo. It's also authenticated by my ssh key so I'm > not prompted for a password. [snip] Wouldn't it still try to call itself? Really fascinating solution otherwise, though.. I might implement that myself. -- user is generated from /dev/urandom