Craig Watson is absolutely right!
While some people insist that working as non-root adds security I tend to oppose this at least under some circumstances! But this depends a lot on what you're doing on the machine...
A desktop user regularly does NOT require root privs and it's really dangerous to work with elevated rights as there are many attack vectors that might be exploitable more easily.
On a (web)server it depends: are you just doing dev-work like uploading apps/coding things or doing administrative stuff? In the first case you probably don't need root permissions, too!
While on a KVM host 95% of the tasks require root privs so using an unpriv user is nothing but complicated. Here it's usually enough to tighten general server security. On such systems I rather suggest disabling password-auth (at the very least for root) e.g. by setting
or add a PAM based solution instead of following the multi-user approach. I've seen a lot of systems where direct root login was disabled for "security" reasons and instead people used a 8 char password for the wheel group user admin.
As long as you lock down root properly it does not pose a significant security risk.
Here are some suggestions (incomplete)
- password requirement for single user mode
- set a looong root password (but skip certain special chars when using a IPMI/DRAC card for remote access)
- disallow pasword-based root logins
- limit root logins to certain IPs/a managment network
- limit the availability of (managment) services to certain IPs/a managment network
- double check the services you expose to the network and only allow those that are required and properly secured.
@ Olivier S
I've managed to disable PermitRootLogin in my sshd_config for security reasons.
The OP mentioned this and while he is asking how to disable the sudo password promt this is all related to security! Besides that I did not focus on SSH nor did I say it's always a bad idea to use sudo without password. Nevertheless while the question has already been answered people should still be made aware of the consequences.
Just because it's common practice to do something the way X you always have to question how that way does perform in the specific situation.
The result in this specific case is that the OP is using an unpriv-account due to security reasons. Now the password promt annoys him so he wants it to be disabled. The result will be that the machine is at least as insecure as if he would be working as root directly!
In fact it makes sense to use sudo without password for certain jobs but then you should always limit that to a specific set of commands or use a secure wrapper-script!