TurnKey Linux Virtual Appliance Library

LAMP using Username but says not in sudoer file (SOLVED)

I have created <username> to log in alternatively in LAMP appliance. However, as I try logging in as root typing sudo su - I receive this error message:

<username> is not in the sudoers file. This incident will be reported.

Solution?

 

Thank you.

 

 

Hi, you need to log in as the

Hi, you need to log in as the root or sudo account, in the shell, type:

visudo (for root account)

or:

sudo visudo (for sudo account)

and then add yourself a line below:

# User privilege specification
root    ALL=(ALL) ALL
<username>    ALL=(ALL) ALL

(you need to type i to insert characters, and when you are done, press Escape, and then :wq to save & quit.

 

 Good luck!

  # /etc/sudoers # # This

 

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults        env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL
  <username> ALL=(ALL) ALL

 

 

Hi look, the above is the visudo file I have added <username> ALL =(ALL) ALL

 

still sudo su doesn't work for my new user, any explanation?

 

Thank you.


Hi, by <username> I mean

Hi, by <username> I mean input there the name of the user you want to be sudo, not <username> itself.

for example:

root    ALL=(ALL) ALL
leow    ALL=(ALL) ALL

Of course this user account must have been created before on your system.

Let me know how you get on.

I meant <username> = leow I

I meant <username> = leow

I understand that part, friend. It didn't work.


Solved.

Thanks, Guest. It's working, I just apt-get update it and re-do. It's working now.

 

Thanks a bunch.

 

:)


Glad I helped. I think you

Glad I helped. I think you need to log out and log back in again for the change to take effect.

Anyway you're sorted now.

Enjoy

help please!!

manjot@Matrix:~$ visudo
visudo: /etc/sudoers: Permission denied
visudo: /etc/sudoers: Permission denied
manjot@Matrix:~$
 hi, i get this output when type -  visudo

:S

and when i used it as sudo

manjot@Matrix:~$ sudo visudo
[sudo] password for manjot:
Sorry, try again.
[sudo] password for manjot:
manjot is not in the sudoers file.  This incident will be reported.
 

how can i be a sudoer user? and get root password?

Here comes your Help, hopefully really Help you..

1. Log in as Root.

2. type visudo

3. add this

root    ALL=(ALL) ALL
manjot    ALL=(ALL) ALL

4. Save

* Learn how to edit visudo. You need to type 'i' before you're able to edit. After that, 'Esc' and :wq to save and quit.

* Refer to the upper posts, I'm also taught. Unfortunately I don't know his name. He's 'Guest'

 


Clement's picture

help on administrative account

Hey leow, you made me think I should create an account :-) so my name is not "Guest" :-)

manjot - did you manage to sort out your problem? make sure you input what leow wrote under

# User privilege specification
root    ALL=(ALL) ALL

before you save & quit. the whole procedure is described above in the post. Naturally you'll need to have control of an administrative account such as root.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)