If you need to run a lot of commands as root, the easiest sudo method is simply 'sudo su -' which makes you into root. The trailing '-' does a login which replaces your environment with root's.
________________________________ From: [email protected] <[email protected]> on behalf of Gilbert E. Detillieux <[email protected]> Sent: Wednesday, April 7, 2021 9:19 AM To: Andrew C Aitchison <[email protected]> Cc: scientific-linux-users <[email protected]> Subject: Re: sudo - was Re: FWIW: AlmaLinux now available. On 2021-04-07 2:11 a.m., Andrew C Aitchison wrote: > On Tue, 6 Apr 2021, Yasha Karant wrote: > >> The major issue I find is that everything at the system level is sudo >> -- however, for Ubuntu, I have found the fixes so that I can become >> root and do what I need both from a text interface and a GUI interface. > > I find sudo on Ubuntu much easier to use than sudo on SL6. > By default on Ubuntu you can run succeccive sudo commands without > reentering the password each time. > I never figured out how to do that with SL. That doesn't sound like default behaviour for sudo on SL6. I've been using it for years, and haven't had the password issue you mention. Since sudo is pretty old, stable code, there likely aren't any differences between its implementation in RHEL/SL vs Debian/Ubuntu, other than the content of the /etc/sudoers file. I'd check that against the distro's clean, initial configuration, and see what's broken. > When I need to use pipes or redirect stdin and stdout as root, > a simple "sudo bash" first solves those issues. You can use "sudo -i" to accomplish the same thing, but with perhaps more "sane" initial setup, since it simulates a login. Gilbert -- Gilbert E. Detillieux E-mail: <[email protected]> Dept. of Computer Science Web: https://urldefense.proofpoint.com/v2/url?u=http-3A__cs.umanitoba.ca_-7Egedetil_&d=DwIDaQ&c=gRgGjJ3BkIsb5y6s49QqsA&r=gd8BzeSQcySVxr0gDWSEbN-P-pgDXkdyCtaMqdCgPPdW1cyL5RIpaIYrCn8C5x2A&m=ngvZhv2g2MiFuLwD8Pig29aVZry8YCxwGnF4G1QV_jk&s=npAcwiHQAtZERrcpKjbPYhJrQcqMvbSLkfOIpJGM5Z4&e= University of Manitoba Phone: 204-783-1031 Winnipeg MB CANADA R3T 2N2 For best service, contact <[email protected]>.
