User not in the sudoers file. This incident will be reported
It would be something of a security hole if you could add yourself to /etc/sudoers
without having sudo or root access. Basically then anyone could make themselves root.
Basically you need to ask the administrators of that machine to add you, or to install the package for you, as per the policies of the site.
You should also be sure to use visudo to edit the sudoers file - it checks that the syntax is correct before writing the file. And you can use editors other than vi with visudo. It will by default use whatever you have set as $EDITOR
and if you don't have it set you could do
# EDITOR=nano visudo
to use the nano editor instead.
Login as root and use /usr/sbin/visudo
to edit the file and add your username. Normal vi/vim will not be able to edit the file.
The easiest way is to just go down until you see the line "root ALL=(ALL) ALL
" and add yourself under that with the same syntax (yourusername ALL=(ALL) ALL
). Or, you can read the sudoers manpage if you want to give yourself more specific privileges.