How to solve “is not in the sudoers file” ? (如何解决”is not in the sudoers file”)

When you use "sudo" command in Solaris, if you encounter the problem "UserName is not in the sudoers file" , here is a solution about it:

  • become root : su –
  • chmod +w /opt/csw/etc/sudoers
  • add 

UserName ALL=(ALL) ALL

     into last line of /opt/csw/etc/sudoers

  • chmod -w /opt/csw/etc/sudoers   

5 thoughts on “How to solve “is not in the sudoers file” ? (如何解决”is not in the sudoers file”)

  1. i just installed mint and somehow my name got removed from the sudoers file.. now i dont have admin or root permissions…
    anyone know how to sort this?

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s