Quick Tip: Setup Ubuntu-style Sudo on other Distributions
Ubuntu's sudo command is something that I miss when I'm using other distributions. For the uninitiated, when using Ubuntu, you can execute privileged commands as the root user by prefacing them with sudo. This saves having to log in as root, do your work and then log out again (or if you're like me, forget to log out and keep doing things as root). Fortunately, it's a cinch to add the functionality to other distributions such as Debian or Fedora.
Here's a funny thing (well, I found it amusing): If you attempt to execute a command using sudo on, say, stock Debian, before being prompted for your password, you are issued a stern warning:
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
Once you've got over the lecture and you enter the password, you quickly learn that other distributions don't handle sudo in quite the same way as Ubuntu.
[username] is not the in the sudoers file. This incident will be reported.
Eek! The Debian Police didn't actually turn up at my house on this occasion, and although I did notice a helicopter circling above my house for a while, it might have been a coincidence.
To add Ubuntu-style functionality you need to edit the file /etc/sudoers
Obviously you can't use sudo yet, so make youtself root by typing
Then, use your favorite text editor to open up /etc/sudoers. For example, under Debian type
Scroll down until you find the line
root ALL=(ALL) ALL
and underneath, add the line
[your username] ALL=(ALL) ALL
substituting [your username] as appropriate. Save the file and exit the editor. Once you've done this, test things out by executing a command that requires root privileges. Under Debian, I ran:
sudo apt-get update
and sure enough, the command ran with root privileges. As with Ubuntu, it caches your password for a while, so you don't have to keep re-entering it for every command.
UK based freelance writer Michael Reed writes about technology, retro computing, geek culture and gender politics.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Profiles and RC Files
- Understanding Ceph and Its Place in the Market
- Astronomy for KDE
- The Giant Zero, Part 0.x
- Maru OS Brings Debian to Your Phone
- OpenSwitch Finds a New Home
- Git 2.9 Released
- What's Our Next Fight?
- SoftMaker FreeOffice
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide