Linux Tutorial – Sudoers

Hi everyone, today i will show you what is sudoers file and what does it do?

When an authorized user creates a new user, the newly created user cannot perform certain operations such as read or write some secret file and installation new software on operating system. Must have sudo authority for these.

For example, i try to read /etc/shadow file (users password file with encrypted)

As you see, normal user can’t read that file because it is a very important file. After i tried to run with sudo but this time i was see oracle is not in the sudoers file.

It means, we need to add oracle to sudoers file . This file is located under /etc . 

Loging root before edit that file.

su - root
vi /etc/sudoers

press  the Shift+G combination , this will take you to the end of the file and press i for edit file.

Another problem 🙁

File is in read-only mode, needed to change permission. Exit file with ESC -> :q! 

ls -l /etc/sudoers
chmod 640 /etc/sudoers
ls -l /etc/sudoers

Okay seems ready for writing. Open again ,

vi /etc/sudoers

press  the Shift+G combination and press i for writing.


Add selected place with red field, you can change the user name or add other users.

Then, ESC -> :wq for exit .


Now, Let’s try again


sudo cat /etc/shadow

See, we can now run the command that we couldn’t run before adding it to sudoers.

See you next artical..










Deniz Parlak

Hi, I'm a Computer Engineering student in Dumlupınar University.I will graduate next year. I did an internship TurkNet Telecominication Company in 2018 June- 2018 September. I had experience Linux/Unix system, SQL Server Management , SSRS, Mysql Database Management,Troubleshooting performance issues in Linux. I also interested Oracle database and technologies. I want to work as Oracle DBA after my University. I am practicing Unix, Exadata, Orace Cloud, Oracle RAC, Dataguard, EBS, Oracle BI and etc and i hope the articles will be helpful. Any questions, or support please write email

Leave a Reply

Your email address will not be published. Required fields are marked *