Giter Site home page Giter Site logo

doas: syntax error at line 1 about doas HOT 8 CLOSED

ReduxFlakes avatar ReduxFlakes commented on September 18, 2024
doas: syntax error at line 1

from doas.

Comments (8)

slicer69 avatar slicer69 commented on September 18, 2024 1

It looks like there is no newline character at the end of the first line of the doas.conf. Just open the file again and press Enter at the end of the line. Then save the doas.conf file. There is a reference to this requirement in the doas.conf manual page:

 Entries in the doas.conf file must end with a newline character to indicate where a
 rule ends. Most text editors will add a newline or end of line character for you,
 however not all tools do. Please make sure each rule in your doas.conf file ends
 with a newline (Enter) character. Otherwise syntax checks will fail with an error
 "syntax error at line..."

from doas.

slicer69 avatar slicer69 commented on September 18, 2024

Thanks for letting us know. It sounds like there is a syntax error in the doas.conf file. Could you post the contents of the /usr/local/etc/doas.conf file here?

from doas.

ReduxFlakes avatar ReduxFlakes commented on September 18, 2024

What i have on the doas.conf file is this:
permit tiago as root

Thanks for the quick response!

from doas.

slicer69 avatar slicer69 commented on September 18, 2024

Assuming your username is tiago, then this line looks correct. There are a few things which could be happening here.

  1. There is a special character like a Tab in the line which is not visible. Creating a fresh doas.conf file can fix this.

  2. The doas.conf file has been created where doas is not looking for it. For instance, if you created your file as /etc/doas.conf, but doas is looking in /usr/local/etc/doas.conf for its configuration.

  3. Please make sure root has read access to the doas.conf file.

from doas.

ReduxFlakes avatar ReduxFlakes commented on September 18, 2024

Thanks, after deleting the /usr/local/etc/doas.conf and creating a new one in /etc/doas.conf and in /usr/local/etc/doas.conf with the permission root: read & write, gives this message doas: /usr/local/etc/doas.conf is writable by group or other but if i change to root: read only gives again doas: syntax error at line 1 i'm not sure where is the problem i tried creating a new one but gives the same problem, thanks for responding, i attached a print with the problem and yes my username is tiago.

problem

from doas.

slicer69 avatar slicer69 commented on September 18, 2024

Thank you for posting this. Would you please post the output of the two following commands:

 ls -l /usr/local/bin/doas

and the command

 sudo cat /usr/local/etc/doas.conf

Thank you

from doas.

ReduxFlakes avatar ReduxFlakes commented on September 18, 2024

Here is the output:

img002

from doas.

ReduxFlakes avatar ReduxFlakes commented on September 18, 2024

Thanks the command is now working like a charm, probably mousepad doesn't add a newline, thank you so much!

img003

from doas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.