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?

留下评论