Giter Site home page Giter Site logo

Error upgrading CBSD v.10.3.0 about cbsd HOT 9 CLOSED

cbsd avatar cbsd commented on July 24, 2024
Error upgrading CBSD v.10.3.0

from cbsd.

Comments (9)

olevole avatar olevole commented on July 24, 2024

Hi,

Error associated with cpr is not fatal - I'll fix it, thanks (this is old script which i forget to remove)

For initenv/workdir: Do I understand correctly that before CBSD did not work on this server?
Likely if you run it via sudo - sudo is not configured to pass environment with "workdir" name.

Can you execute:

env workdir="/usr/jails" /usr/local/cbsd/sudoexec/initenv

from root user, without sudo ?

from cbsd.

Juronski avatar Juronski commented on July 24, 2024

Before CBSD worked correctly on this server. This issue is after upgrading from v 10.2.0. to .v 10.3.0.

I have executed (from root user, without sudo)

env workdir="/usr/jails" /usr/local/cbsd/sudoexec/initenv

than

cbsd initenv

still I get

no workdir

and also the Illegal option as above after cbsd help

from cbsd.

olevole avatar olevole commented on July 24, 2024

According to https://github.com/olevole/cbsd/blob/master/sudoexec/initenv#L713:

if [ -z "${workdir}" ]; then
        . /etc/rc.conf
        if [ -n "${cbsd_workdir}" ]; then
            workdir="${cbsd_workdir}"
        else
            workdir="/usr/jails"
        fi
    fi

your rc.conf does not have cbsd_workdir variable. Please make sure that you have workdir in rc.conf:

grep ^cbsd_workdir /etc/rc.conf

has to return cbsd_workdir="/usr/jails". If variable exist, send binary cbsd version, shell xtrace output and truss result:

1) 
% cbsd -c version
2)
% cbsd initenv --debug
3)
% truss cbsd

and FreeBSD version:

% uname -rm

from cbsd.

Juronski avatar Juronski commented on July 24, 2024

/usr/jails is there

grep ^cbsd_workdir /etc/rc.conf
cbsd_workdir="/usr/jails"
uname -rm
10.1-RELEASE-p6 amd64
cbsd -c version
10.3.0
cbsd initenv --debug
no workdir

Attached you find the output of truss cbsd
truss_cbsd.txt

from cbsd.

olevole avatar olevole commented on July 24, 2024

Interesting.. a feeling that the sudo configuration does not pass workdir environment for cbsd user.
Can you check /usr/local/etc/sudoers.d/cbsd_sudoers content ? It should look like this:

% cat /usr/local/etc/sudoers.d/cbsd_sudoers

Defaults     env_keep += "workdir DIALOG NOCOLOR CBSD_RNODE"
Cmnd_Alias   CBSD_CMD = /usr/jails/sudoexec/*,/usr/local/cbsd/sudoexec/*
cbsd   ALL=(ALL) NOPASSWD: CBSD_CMD

from cbsd.

Juronski avatar Juronski commented on July 24, 2024

The sudo configuration was not set. After setting the sudo configuration I do not get the no workdir-error anymore.

Still have the Illegal option -- and /usr/local/bin/cbsd: cpr: not found when I do CBSD help. This is associated with cpr you mentioned?

from cbsd.

olevole avatar olevole commented on July 24, 2024

cpr: not found error you can solve by removing the line "cpr" from the file /usr/local/cbsd/securecmd and by re-runing cbsd initenv. This is already done via olevole@e0c0294 .
About "Illegal option --": this is known issue for me, but the reasons for this (and how it fix) is still unknown. I'm still in search of solutions.

from cbsd.

Juronski avatar Juronski commented on July 24, 2024

Ok. Thank you!

from cbsd.

olevole avatar olevole commented on July 24, 2024

Fix illegal options: olevole@0cbfad7

Thanks.

from cbsd.

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.