I'm new to Debian, but learning things very fast.
Working on Debian Wheezy, and I realize that if I create a new user with useradd, the user gets sudo rights! To test this, I log in with the new user through ssh, and I find that the user can sudo, and it prompts for root's password, and as the new user enters the root password, the user gets root access!
When I run
more /etc/group, the sudo group only has one original user that I created while installing Debian to have sudo rights so that I don't have to log in through root for security.
But to my surprise, every new user created, even though not added to sudo group, is getting the right to sudo. Why is this happening? Anyway, my
/etc/sudoers file has the following lines uncommented :
Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" root ALL=(ALL:ALL) ALL %sudo ALL=(ALL:ALL) ALL
I'm suspecting the last line to be responsible for this. Is it due to the same? How I can stop every new user from getting the right to sudo? Thanks.