Posts tagged ‘sudo’

How to prevent Linux from remembering your sudo password

terminal.png

You may know that if you type

sudo [command]

Your password will be asked, but if you type it again in a few seconds, it will not be asked, because Linux “remember” your password for some time, well if you are really concerned about this, you may force Linux to “forget” your password inmediately.

How to do it?

sudo visudo

And add this line:

Defaults	timestamp_timeout = 0

You may change 0 to any number representing the minutes you may want your password to be “remembered”, or let in 0 so you will need to type your password each time you type sudo

Source

Add Sudo to Your Last Bash Command With “!!” Syntax

tux.png

How often have you typed in a command in your linux shell, and then realized that you forgot to type sudo, so you end up with an error or editing the dreaded read-only file? This happens to me much more than I’d like to admit, so I’m writing about it.

Continue reading ‘Add Sudo to Your Last Bash Command With “!!” Syntax’ »

Enable Sudo insults and sl for some laughs

tux.png

I recently found a fun feature available within the sudo program that will insult you when you do the wrong thing such as enter your password incorrectly. I’ll tell you how you can activate the feature for a few laughs and also give a few examples of what insults you might get.

Continue reading ‘Enable Sudo insults and sl for some laughs’ »

A reminder about the proper way to invoke root in Ubuntu

ubuntu.png

I’ve been answering a lot of support threads lately wherein users have said they are unable to empty the trash can because a file in there is owned by root or they cannot get a Firefox setting change to stick (and it turns out their Firefox settings folder is owned by root).

Do you know where this comes from, why this is happening?

Bad advice. It all comes from bad advice.

The follow hopes to counter that.

Continue reading ‘A reminder about the proper way to invoke root in Ubuntu’ »

Understanding /etc/passwd, /etc/group, /etc/sudoers, and /etc/skel/

terminal-glossy.jpg

I decided to write this as a subsection of Root, Superuser, and User Management Basics as that was getting rather lengthy. There is a bit more to understand about managing users, groups, and super-user permissions. We’ve already covered how to add a user, delete a user, add a group, delete a group, rename a group, and how to reset a user’s password. Now what we didn’t go into depth was, all of this information is controlled by a number of files and these commands modify these files. These files can be manually editted though to accomplish the same thing or for more detailed management.

Continue reading ‘Understanding /etc/passwd, /etc/group, /etc/sudoers, and /etc/skel/’ »

User Management Basics

terminal-glossy.jpg

This will cover the basics of user and group management as well as touch on the abilities of super users.

Continue reading ‘User Management Basics’ »