I recently got into trouble because of this.
$sudo vim /etc/motd [sudo] password for bruce: bruce is not in the sudoers file. This incident will be reported.
Is there a way to check if I have sudo access or not?
Man page excerpt:
If your user is only allowed to run specific commands, this command will work, indicating you are allowed to run something with different privileges. While the message looks different when trying to execute a command you're not allowed to in this case (and no mail is sent to root), it's still possible you'll get into trouble if the admins read
To find out what you're allowed to run with different privileges, you can use
Follow these steps to view the sudoers file. If you're in there, you have sudo. If not, you can add yourself.