Coder Social home page Coder Social logo

Comments (4)

jburgess777 avatar jburgess777 commented on June 26, 2024

It looks this is caused because I set DUMP1090_USER="root". The adduser script generally doesn't complain about system users already existing but it insists they have UIDs in a specific range, which doesn't include root:

# a user with this name already exists; it's a problem when it's not a system user
my $tmp_u = getpwnam($new_name);
if (($tmp_u >= $config{"first_system_uid"}) and ($tmp_u <= $config{"last_system_uid"})) {
    printf (gtx("The system user `%s' already exists. Exiting.\n"), $new_name) if $verbose;
    exit RET_OK
}
warnf (gtx("The user `%s' already exists. Exiting.\n"), $new_name);

some other scripts seem to use getent to check for existence instead

if ! getent passwd sshd >/dev/null; then
        adduser --quiet --system --no-create-home --home /var/run/sshd --shell /usr/sbin/nologin sshd
fi

from dump1090.

mutability avatar mutability commented on June 26, 2024

Yeah, all sorts of things are likely to break if you say to use root. Don't use root. No, really, don't use root. It's a terrible idea :)

I'll see what I can sort out in terms of handling existing users better though, thanks for the report.

from dump1090.

jburgess777 avatar jburgess777 commented on June 26, 2024

I knew it was a bad idea but dump1090 had previously been running as root before moving to the mutability package and I wasn't sure that a non-root user would have access to the USB device.

I have set the user back to dump1090, reinstalled the package and all is OK now.

from dump1090.

mutability avatar mutability commented on June 26, 2024

Should be sorted for the future - it'll reject root now, and it uses getent as you suggested to avoid trying to create the user if it's already there.

from dump1090.

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.