Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using SSH to connect to my VPS server and I'd like to check my mail logs. I'm very new to Unix, but trying to nano the files gives me a permissions error. I don't want to log in as root, and my user is a part of the wheel, but using su isn't working either. What's the proper way to view these files without using root?

share|improve this question
    
"su isn't working either" - Can you be more specific? –  Dennis Williamson Aug 10 '10 at 17:27
    
I tried using "su" to authenticate as superuser. It said my password was incorrect (I assume it needs the root password?) –  Nic Aug 10 '10 at 17:28
    
Yes it needs the root password. If it fails it is not the right one or you had a typo. Sometimes 0 and O or l and 1 read very similar too ;) –  matthias krull Aug 10 '10 at 17:43

2 Answers 2

up vote 1 down vote accepted

looks like wheel has ether no permission to use that command or your user is not in wheel.

In your /etc/sudoers file you can maybe find a line like

%wheel  ALL=(ALL) ALL

if not add this line to allow users that are in wheel to use sudo. (dont add this if another group can sudo like %admin in some distros. Add your user to admin in that case)

You have to do this as root.

Check if you are realy in wheel with

groups your_username

If not add yourself to wheel. Again as root.

usermod -aG wheel your_username
share|improve this answer
    
I'm in as root, attempting to make this change, but the system isn't finding "visudo." Any suggestions? –  Nic Aug 10 '10 at 17:49
    
Whoops! Did "su -" and was able to edit it. –  Nic Aug 10 '10 at 17:59
    
Aaaand everything works. Thank you for that info. –  Nic Aug 10 '10 at 18:01

try

sudo nano fileName

share|improve this answer
    
"user is not in the sudoers file. This incident will be reported" –  Nic Aug 10 '10 at 17:24
    
The root user needs to grant you the rights. You can edit sudoers file by running "visudo". On Ubuntu, by default all members of the "admin" group have the right to run sudo. –  Eric Darchis Aug 10 '10 at 17:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.