Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #230990 > unrolled thread

setuid question

Started byGene Heskett <gheskett@shentel.net>
First post2021-01-23 00:30 +0100
Last post2021-01-23 01:40 +0100
Articles 17 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 00:30 +0100
    Re: setuid question Larry Martell <larry.martell@gmail.com> - 2021-01-23 00:40 +0100
      Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 01:40 +0100
        Re: setuid question Larry Martell <larry.martell@gmail.com> - 2021-01-23 02:00 +0100
          Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 02:40 +0100
    Re: setuid question David Christensen <dpchrist@holgerdanske.com> - 2021-01-23 00:40 +0100
      Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 01:10 +0100
        Re: setuid question Larry Martell <larry.martell@gmail.com> - 2021-01-23 01:20 +0100
          Re: setuid question Larry Martell <larry.martell@gmail.com> - 2021-01-23 02:20 +0100
          Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 02:20 +0100
        Re: setuid question The Wanderer <wanderer@fastmail.fm> - 2021-01-23 01:20 +0100
          Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 02:20 +0100
      Re: setuid question David Christensen <dpchrist@holgerdanske.com> - 2021-01-23 06:30 +0100
        Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 07:40 +0100
        Re: setuid question Gene Heskett <gheskett@shentel.net> - 2021-01-23 07:50 +0100
          Re: setuid question David Christensen <dpchrist@holgerdanske.com> - 2021-01-23 09:30 +0100
    Re: setuid question Charles Curley <charlescurley@charlescurley.com> - 2021-01-23 01:40 +0100

#230990 — setuid question

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 00:30 +0100
Subjectsetuid question
Message-ID<BAe2m-76j-7@gated-at.bofh.it>
Greeting all;

I have a problem, using amanda, locally 
built. /usr/local/libexec/amanda/ambind needs to be setuid, but isn't.

How or what do I do to fix it?

Thank you.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [next] | [standalone]


#230991

FromLarry Martell <larry.martell@gmail.com>
Date2021-01-23 00:40 +0100
Message-ID<BAec1-798-5@gated-at.bofh.it>
In reply to#230990
On Fri, Jan 22, 2021 at 3:29 PM Gene Heskett <gheskett@shentel.net> wrote:
>
> Greeting all;
>
> I have a problem, using amanda, locally
> built. /usr/local/libexec/amanda/ambind needs to be setuid, but isn't.
>
> How or what do I do to fix it?

chmod u+s /usr/local/libexec/amanda/ambind

[toc] | [prev] | [next] | [standalone]


#231000

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 01:40 +0100
Message-ID<BAf85-7Gj-1@gated-at.bofh.it>
In reply to#230991
On Friday 22 January 2021 18:36:29 Larry Martell wrote:

> On Fri, Jan 22, 2021 at 3:29 PM Gene Heskett <gheskett@shentel.net> 
wrote:
> > Greeting all;
> >
> > I have a problem, using amanda, locally
> > built. /usr/local/libexec/amanda/ambind needs to be setuid, but
> > isn't.
> >
> > How or what do I do to fix it?
>
> chmod u+s /usr/local/libexec/amanda/ambind
Doesn't fix it Larry
root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck Daily"
Amanda Tape Server Host Check
-----------------------------
ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available, using 
212292 MB
Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
Will write to volume 'Dailys-3' in slot 3.
NOTE: skipping tape-writable test
Server check took 0.102 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: coyote: selfcheck request failed: ambind: bind failed A: 
Permission denied
ERROR: shop: selfcheck request failed: ambind: bind failed A: Permission 
denied
ERROR: lathe: selfcheck request failed: ambind: bind failed A: Permission 
denied
ERROR: GO704: selfcheck request failed: ambind: bind failed A: Permission 
denied
ERROR: rpi4: selfcheck request failed: ambind: bind failed A: Permission 
denied
Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
(brought to you by Amanda 3.5.1)
root@coyote:amanda-3.5.1$ ls -l /usr/local/libexec/amanda/ambind
-rwsr-x--- 1 amanda backup 26640 Jan 22 
18:46 /usr/local/libexec/amanda/ambind

A simple make install, after making it as amanda has always Just Worked 
for about 15 years before now. The build has been driven by this script 
for about that many years also, with one recent addition to 
the ./configure arguments, as follows:

root@coyote:amanda-3.5.1$ cat gh.cf
#!/bin/sh
# since I'm always forgetting to su amanda...
if [ `whoami` != 'amanda' ]; then
        echo
        echo "!!!!!!!!!!!!!!!!!! Warning !!!!!!!!!!!!!!!!!!!"
        echo "Amanda needs to be configured and built by the"
        echo "user amanda, but must be installed by user root."
        echo
        exit 1
fi
make clean
rm -f config.status config.cache
./configure --with-user=amanda \
        --with-group=disk \
        --with-owner=amanda \
        --with-gnu-ld \
        --prefix=/usr/local/ \
        --with-debugging=/tmp/amanda-dbg/ \
        --with-tape-server=coyote \
        --with-bsdtcp-security --with-amandahosts \
        --with-configdir=/usr/local/etc/amanda \
        --enable-manpage-build  \
        --with-readline \
        --without-ipv6 \ <-most recent addition
        --with-gnutar=/bin/tar
echo "sleeping for reading configures warnings"
echo "a make as amanda will continue after 75 seconds..."
sleep 75
make

Thanks Larry.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#231002

FromLarry Martell <larry.martell@gmail.com>
Date2021-01-23 02:00 +0100
Message-ID<BAfrr-7Mh-1@gated-at.bofh.it>
In reply to#231000
On Fri, Jan 22, 2021 at 4:38 PM Gene Heskett <gheskett@shentel.net> wrote:
>
> On Friday 22 January 2021 18:36:29 Larry Martell wrote:
>
> > On Fri, Jan 22, 2021 at 3:29 PM Gene Heskett <gheskett@shentel.net>
> wrote:
> > > Greeting all;
> > >
> > > I have a problem, using amanda, locally
> > > built. /usr/local/libexec/amanda/ambind needs to be setuid, but
> > > isn't.
> > >
> > > How or what do I do to fix it?
> >
> > chmod u+s /usr/local/libexec/amanda/ambind
> Doesn't fix it Larry
> root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck Daily"
> Amanda Tape Server Host Check
> -----------------------------
> ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
> NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available, using
> 212292 MB
> Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
> Will write to volume 'Dailys-3' in slot 3.
> NOTE: skipping tape-writable test
> Server check took 0.102 seconds
> Amanda Backup Client Hosts Check
> --------------------------------
> ERROR: coyote: selfcheck request failed: ambind: bind failed A:
> Permission denied
> ERROR: shop: selfcheck request failed: ambind: bind failed A: Permission
> denied
> ERROR: lathe: selfcheck request failed: ambind: bind failed A: Permission
> denied
> ERROR: GO704: selfcheck request failed: ambind: bind failed A: Permission
> denied
> ERROR: rpi4: selfcheck request failed: ambind: bind failed A: Permission
> denied
> Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
> (brought to you by Amanda 3.5.1)
> root@coyote:amanda-3.5.1$ ls -l /usr/local/libexec/amanda/ambind
> -rwsr-x--- 1 amanda backup 26640 Jan 22
> 18:46 /usr/local/libexec/amanda/ambind

Try chown root /usr/local/libexec/amanda/ambind

and after that check that the suid bit is still set

[toc] | [prev] | [next] | [standalone]


#231006

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 02:40 +0100
Message-ID<BAg49-8dA-7@gated-at.bofh.it>
In reply to#231002
On Friday 22 January 2021 19:51:36 Larry Martell wrote:

> On Fri, Jan 22, 2021 at 4:38 PM Gene Heskett <gheskett@shentel.net> wrote:
> > On Friday 22 January 2021 18:36:29 Larry Martell wrote:
> > > On Fri, Jan 22, 2021 at 3:29 PM Gene Heskett
> > > <gheskett@shentel.net>
> >
> > wrote:
> > > > Greeting all;
> > > >
> > > > I have a problem, using amanda, locally
> > > > built. /usr/local/libexec/amanda/ambind needs to be setuid, but
> > > > isn't.
> > > >
> > > > How or what do I do to fix it?
> > >
> > > chmod u+s /usr/local/libexec/amanda/ambind
> >
> > Doesn't fix it Larry
> > root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck
> > Daily" Amanda Tape Server Host Check
> > -----------------------------
> > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
> > NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available,
> > using 212292 MB
> > Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
> > Will write to volume 'Dailys-3' in slot 3.
> > NOTE: skipping tape-writable test
> > Server check took 0.102 seconds
> > Amanda Backup Client Hosts Check
> > --------------------------------
> > ERROR: coyote: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: shop: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: lathe: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: GO704: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: rpi4: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
> > (brought to you by Amanda 3.5.1)
> > root@coyote:amanda-3.5.1$ ls -l /usr/local/libexec/amanda/ambind
> > -rwsr-x--- 1 amanda backup 26640 Jan 22
> > 18:46 /usr/local/libexec/amanda/ambind
>
> Try chown root /usr/local/libexec/amanda/ambind
>
> and after that check that the suid bit is still set

that fixed the ambind, but now have 132 problems with amgtar, no permission. 
tried to fix it with the same pill, get
root@coyote:amanda-3.5.1$ ls -lh /usr/local/libexec/amanda/application/amgtar
-rwxr-x--- 1 root disk 158K Jan 22 20:17 /usr/local/libexec/amanda/application/amgtar
Which says the setuid bit wasn't set so I reset it:
root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/application/amgtar
root@coyote:amanda-3.5.1$ ls -lh /usr/local/libexec/amanda/application/amgtar
-rwsr-x--- 1 root disk 158K Jan 22 20:17 /usr/local/libexec/amanda/application/amgtar
but still get 132 copys of:
selfcheck (etc does matter): error [exec /usr/local/libexec/amanda/application/amgtar: Permission denied]
when running:su amanda -c "/usr/local/sbin/amcheck Daily"

Something IMO has been updated in stretch's perl, that has totally screwed amanda.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#230992

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-01-23 00:40 +0100
Message-ID<BAec1-798-3@gated-at.bofh.it>
In reply to#230990
On 2021-01-22 15:29, Gene Heskett wrote:
> Greeting all;
> 
> I have a problem, using amanda, locally
> built. /usr/local/libexec/amanda/ambind needs to be setuid, but isn't.
> 
> How or what do I do to fix it?

How about chmod(1) as root?

# chmod u+s /usr/local/libexec/amanda/ambind


David

[toc] | [prev] | [next] | [standalone]


#230996

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 01:10 +0100
Message-ID<BAeF4-7xD-13@gated-at.bofh.it>
In reply to#230992
On Friday 22 January 2021 18:35:27 David Christensen wrote:

>  chmod u+s /usr/local/libexec/amanda/ambind

root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/ambind
root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck Daily"
Amanda Tape Server Host Check
-----------------------------
ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available, using 
212292 MB
Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
Will write to volume 'Dailys-3' in slot 3.
NOTE: skipping tape-writable test
Server check took 0.103 seconds
Amanda Backup Client Hosts Check
--------------------------------
ERROR: coyote: selfcheck request failed: ambind: bind failed A: 
Permission denied
ERROR: shop: selfcheck request failed: ambind: bind failed A: Permission 
denied
ERROR: lathe: selfcheck request failed: ambind: bind failed A: Permission 
denied
ERROR: GO704: selfcheck request failed: ambind: bind failed A: Permission 
denied
ERROR: rpi4: selfcheck request failed: ambind: bind failed A: Permission 
denied
Client check: 5 hosts checked in 11.298 seconds.  5 problems found.

Next?

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#230998

FromLarry Martell <larry.martell@gmail.com>
Date2021-01-23 01:20 +0100
Message-ID<BAeOJ-7Aw-1@gated-at.bofh.it>
In reply to#230996
On Fri, Jan 22, 2021 at 4:09 PM Gene Heskett <gheskett@shentel.net> wrote:
>
> On Friday 22 January 2021 18:35:27 David Christensen wrote:
>
> >  chmod u+s /usr/local/libexec/amanda/ambind
>
> root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/ambind
> root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck Daily"
> Amanda Tape Server Host Check
> -----------------------------
> ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
> NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available, using
> 212292 MB
> Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
> Will write to volume 'Dailys-3' in slot 3.
> NOTE: skipping tape-writable test
> Server check took 0.103 seconds
> Amanda Backup Client Hosts Check
> --------------------------------
> ERROR: coyote: selfcheck request failed: ambind: bind failed A:
> Permission denied
> ERROR: shop: selfcheck request failed: ambind: bind failed A: Permission
> denied
> ERROR: lathe: selfcheck request failed: ambind: bind failed A: Permission
> denied
> ERROR: GO704: selfcheck request failed: ambind: bind failed A: Permission
> denied
> ERROR: rpi4: selfcheck request failed: ambind: bind failed A: Permission
> denied
> Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
>
> Next?

Is ambind owned by root?

[toc] | [prev] | [next] | [standalone]


#231003

FromLarry Martell <larry.martell@gmail.com>
Date2021-01-23 02:20 +0100
Message-ID<BAfKN-87E-1@gated-at.bofh.it>
In reply to#230998
On Fri, Jan 22, 2021 at 5:13 PM Gene Heskett <gheskett@shentel.net> wrote:
>
> On Friday 22 January 2021 19:17:13 Larry Martell wrote:
>
> > On Fri, Jan 22, 2021 at 4:09 PM Gene Heskett <gheskett@shentel.net>
> wrote:
> > > On Friday 22 January 2021 18:35:27 David Christensen wrote:
> > > >  chmod u+s /usr/local/libexec/amanda/ambind
> > >
> > > root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/ambind
> > > root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck
> > > Daily" Amanda Tape Server Host Check
> > > -----------------------------
> > > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
> > > NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available,
> > > using 212292 MB
> > > Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
> > > Will write to volume 'Dailys-3' in slot 3.
> > > NOTE: skipping tape-writable test
> > > Server check took 0.103 seconds
> > > Amanda Backup Client Hosts Check
> > > --------------------------------
> > > ERROR: coyote: selfcheck request failed: ambind: bind failed A:
> > > Permission denied
> > > ERROR: shop: selfcheck request failed: ambind: bind failed A:
> > > Permission denied
> > > ERROR: lathe: selfcheck request failed: ambind: bind failed A:
> > > Permission denied
> > > ERROR: GO704: selfcheck request failed: ambind: bind failed A:
> > > Permission denied
> > > ERROR: rpi4: selfcheck request failed: ambind: bind failed A:
> > > Permission denied
> > > Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
> > >
> > > Next?
> >
> > Is ambind owned by root?
>
> It was at install but I'd already fixed that with a root:
> chown amanda:backup /usr/llocal/libexec/amanda/ambind, which shows
> correctly now.
>
> And I found everything just reinstalled is now owned by root:staff, but
> fixing that doesn't change a thing? What the hell?

The error is not setuid-root, so you need to chown root to it, not
chown amanda:backup

[toc] | [prev] | [next] | [standalone]


#231005

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 02:20 +0100
Message-ID<BAfKN-87E-3@gated-at.bofh.it>
In reply to#230998
On Friday 22 January 2021 19:17:13 Larry Martell wrote:

> On Fri, Jan 22, 2021 at 4:09 PM Gene Heskett <gheskett@shentel.net> 
wrote:
> > On Friday 22 January 2021 18:35:27 David Christensen wrote:
> > >  chmod u+s /usr/local/libexec/amanda/ambind
> >
> > root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/ambind
> > root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck
> > Daily" Amanda Tape Server Host Check
> > -----------------------------
> > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
> > NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available,
> > using 212292 MB
> > Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
> > Will write to volume 'Dailys-3' in slot 3.
> > NOTE: skipping tape-writable test
> > Server check took 0.103 seconds
> > Amanda Backup Client Hosts Check
> > --------------------------------
> > ERROR: coyote: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: shop: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: lathe: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: GO704: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > ERROR: rpi4: selfcheck request failed: ambind: bind failed A:
> > Permission denied
> > Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
> >
> > Next?
>
> Is ambind owned by root?

It was at install but I'd already fixed that with a root:
chown amanda:backup /usr/llocal/libexec/amanda/ambind, which shows 
correctly now.

And I found everything just reinstalled is now owned by root:staff, but 
fixing that doesn't change a thing? What the hell?

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#230999

FromThe Wanderer <wanderer@fastmail.fm>
Date2021-01-23 01:20 +0100
Message-ID<BAeOJ-7Aw-7@gated-at.bofh.it>
In reply to#230996

[Multipart message — attachments visible in raw view] — view raw

On 2021-01-22 at 19:09, Gene Heskett wrote:

> On Friday 22 January 2021 18:35:27 David Christensen wrote:
> 
>>  chmod u+s /usr/local/libexec/amanda/ambind
> 
> root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/ambind
> root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck Daily"
> Amanda Tape Server Host Check
> -----------------------------
> ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root

What does

$ ls -lh /usr/local/libexec/amanda/ambind

say?

All 'chmod u+s' does is set the suid bit. What having that bit does (as
I understand matters) is cause the program to run with the permissions
of the user who owns the file.

If that file is owned by some user other than root, than the suid bit
will just cause it to be run as that other user, which may well not be
enough.

You may also want to check

$ file /usr/local/libexec/amanda/ambind

to confirm whether this program is a script; I've seen cases where
having a script with the suid bit set isn't enough, because it invokes
another binary which isn't and the permissions don't wind up getting
passed along. (Whether that happens typically with scripts I don't know.)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

[toc] | [prev] | [next] | [standalone]


#231004

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 02:20 +0100
Message-ID<BAfKN-87E-9@gated-at.bofh.it>
In reply to#230999
On Friday 22 January 2021 19:19:12 The Wanderer wrote:

> On 2021-01-22 at 19:09, Gene Heskett wrote:
> > On Friday 22 January 2021 18:35:27 David Christensen wrote:
> >>  chmod u+s /usr/local/libexec/amanda/ambind
> >
> > root@coyote:amanda-3.5.1$ chmod u+s /usr/local/libexec/amanda/ambind
> > root@coyote:amanda-3.5.1$ su amanda -c "/usr/local/sbin/amcheck
> > Daily" Amanda Tape Server Host Check
> > -----------------------------
> > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
>
> What does
>
> $ ls -lh /usr/local/libexec/amanda/ambind
>
> say?
-rwxr-x--x 1 amanda backup 27K Jan 22 18:46 /usr/local/libexec/amanda/ambind

> All 'chmod u+s' does is set the suid bit. What having that bit does
> (as I understand matters) is cause the program to run with the
> permissions of the user who owns the file.
>
> If that file is owned by some user other than root, than the suid bit
> will just cause it to be run as that other user, which may well not be
> enough.
>
> You may also want to check
>
> $ file /usr/local/libexec/amanda/ambind

/usr/local/libexec/amanda/ambind: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, 
interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=32a4e4b5ad333ece10f31f4ad77224c321656b11, 
not stripped
>
> to confirm whether this program is a script; I've seen cases where
> having a script with the suid bit set isn't enough, because it invokes
> another binary which isn't and the permissions don't wind up getting
> passed along. (Whether that happens typically with scripts I don't
> know.)

Thanks Wanderer

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#231008

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-01-23 06:30 +0100
Message-ID<BAjEJ-1Z2-1@gated-at.bofh.it>
In reply to#230992
On 2021-01-22 15:35, David Christensen wrote:
> On 2021-01-22 15:29, Gene Heskett wrote:
>> Greeting all;
>>
>> I have a problem, using amanda, locally
>> built. /usr/local/libexec/amanda/ambind needs to be setuid, but isn't.
>>
>> How or what do I do to fix it?
> 
> How about chmod(1) as root?
> 
> # chmod u+s /usr/local/libexec/amanda/ambind


On 2021-01-22 16:09, Gene Heskett wrote:
 > root@coyote:amanda-3.5.1$  chmod u+s /usr/local/libexec/amanda/ambind
 > root@coyote:amanda-3.5.1$  su amanda -c "/usr/local/sbin/amcheck Daily"
 > Amanda Tape Server Host Check
 > -----------------------------
 > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
 > NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available, using
 > 212292 MB
 > Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
 > Will write to volume 'Dailys-3' in slot 3.
 > NOTE: skipping tape-writable test
 > Server check took 0.103 seconds
 > Amanda Backup Client Hosts Check
 > --------------------------------
 > ERROR: coyote: selfcheck request failed: ambind: bind failed A:
 > Permission denied
 > ERROR: shop: selfcheck request failed: ambind: bind failed A: Permission
 > denied
 > ERROR: lathe: selfcheck request failed: ambind: bind failed A: Permission
 > denied
 > ERROR: GO704: selfcheck request failed: ambind: bind failed A: Permission
 > denied
 > ERROR: rpi4: selfcheck request failed: ambind: bind failed A: Permission
 > denied
 > Client check: 5 hosts checked in 11.298 seconds.  5 problems found.


On 2021-01-22 17:39, Gene Heskett wrote:
 > On Friday 22 January 2021 19:51:36 Larry Martell wrote:
 >> Try chown root /usr/local/libexec/amanda/ambind
 >>
 >> and after that check that the suid bit is still set
 >
 > that fixed the ambind, but now have 132 problems with amgtar, no 
permission.
 > tried to fix it with the same pill, get
 > root@coyote:amanda-3.5.1$ ls -lh 
/usr/local/libexec/amanda/application/amgtar
 > -rwxr-x--- 1 root disk 158K Jan 22 20:17 
/usr/local/libexec/amanda/application/amgtar
 > Which says the setuid bit wasn't set so I reset it:
 > root@coyote:amanda-3.5.1$ chmod u+s 
/usr/local/libexec/amanda/application/amgtar
 > root@coyote:amanda-3.5.1$ ls -lh 
/usr/local/libexec/amanda/application/amgtar
 > -rwsr-x--- 1 root disk 158K Jan 22 20:17 
/usr/local/libexec/amanda/application/amgtar
 > but still get 132 copys of:
 > selfcheck (etc does matter): error [exec 
/usr/local/libexec/amanda/application/amgtar: Permission denied]
 > when running:su amanda -c "/usr/local/sbin/amcheck Daily"
 >
 > Something IMO has been updated in stretch's perl, that has totally 
screwed amanda.


Sorry I missed the chown(1).  :-(


But, building and installing Amanda from source is turning into a 
cluster f***.


I assumed you had some compelling reason not to use the official packages:

2021-01-22 21:18:42 dpchrist@tinkywinky ~
$ cat /etc/debian_version ; uname -a
9.13
Linux tinkywinky 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) 
x86_64 GNU/Linux

2021-01-22 21:22:07 dpchrist@tinkywinky ~
$ apt-cache search amanda | grep amanda
amanda-client - Advanced Maryland Automatic Network Disk Archiver (Client)
amanda-common - Advanced Maryland Automatic Network Disk Archiver (Libs)
amanda-server - Advanced Maryland Automatic Network Disk Archiver (Server)


But, I have had similar experiences building from source and I now avoid 
it like COVID-19.  Perhaps you should just use the Debian packages.


David

[toc] | [prev] | [next] | [standalone]


#231010

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 07:40 +0100
Message-ID<BAkKt-2B8-1@gated-at.bofh.it>
In reply to#231008
On Saturday 23 January 2021 00:23:45 David Christensen wrote:

> On 2021-01-22 15:35, David Christensen wrote:
> > On 2021-01-22 15:29, Gene Heskett wrote:
> >> Greeting all;
> >>
> >> I have a problem, using amanda, locally
> >> built. /usr/local/libexec/amanda/ambind needs to be setuid, but
> >> isn't.
> >>
> >> How or what do I do to fix it?
> >
> > How about chmod(1) as root?
> >
> > # chmod u+s /usr/local/libexec/amanda/ambind
>
> On 2021-01-22 16:09, Gene Heskett wrote:
>  > root@coyote:amanda-3.5.1$  chmod u+s
>  > /usr/local/libexec/amanda/ambind root@coyote:amanda-3.5.1$  su
>  > amanda -c "/usr/local/sbin/amcheck Daily" Amanda Tape Server Host
>  > Check
>  > -----------------------------
>  > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
>  > NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available,
>  > using 212292 MB
>  > Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
>  > Will write to volume 'Dailys-3' in slot 3.
>  > NOTE: skipping tape-writable test
>  > Server check took 0.103 seconds
>  > Amanda Backup Client Hosts Check
>  > --------------------------------
>  > ERROR: coyote: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: shop: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: lathe: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: GO704: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: rpi4: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
>
> On 2021-01-22 17:39, Gene Heskett wrote:
>  > On Friday 22 January 2021 19:51:36 Larry Martell wrote:
>  >> Try chown root /usr/local/libexec/amanda/ambind
>  >>
>  >> and after that check that the suid bit is still set
>  >
>  > that fixed the ambind, but now have 132 problems with amgtar, no
>
> permission.
>
>  > tried to fix it with the same pill, get
>  > root@coyote:amanda-3.5.1$ ls -lh
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > -rwxr-x--- 1 root disk 158K Jan 22 20:17
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > Which says the setuid bit wasn't set so I reset it:
>  > root@coyote:amanda-3.5.1$ chmod u+s
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > root@coyote:amanda-3.5.1$ ls -lh
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > -rwsr-x--- 1 root disk 158K Jan 22 20:17
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > but still get 132 copys of:
>  > selfcheck (etc does matter): error [exec
>
> /usr/local/libexec/amanda/application/amgtar: Permission denied]
>
>  > when running:su amanda -c "/usr/local/sbin/amcheck Daily"
>  >
>  > Something IMO has been updated in stretch's perl, that has totally
>
> screwed amanda.
>
>
> Sorry I missed the chown(1).  :-(
>
>
> But, building and installing Amanda from source is turning into a
> cluster f***.
>
>
> I assumed you had some compelling reason not to use the official
> packages:

Only because I have been using amanda since before there were official 
rpms.

> 2021-01-22 21:18:42 dpchrist@tinkywinky ~
> $ cat /etc/debian_version ; uname -a
> 9.13
> Linux tinkywinky 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05)
> x86_64 GNU/Linux
>
> 2021-01-22 21:22:07 dpchrist@tinkywinky ~
> $ apt-cache search amanda | grep amanda
> amanda-client - Advanced Maryland Automatic Network Disk Archiver
> (Client) amanda-common - Advanced Maryland Automatic Network Disk
> Archiver (Libs) amanda-server - Advanced Maryland Automatic Network
> Disk Archiver (Server)
>
>
> But, I have had similar experiences building from source and I now
> avoid it like COVID-19.  Perhaps you should just use the Debian
> packages.
>
>
> David


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#231011

FromGene Heskett <gheskett@shentel.net>
Date2021-01-23 07:50 +0100
Message-ID<BAkUa-2En-7@gated-at.bofh.it>
In reply to#231008
On Saturday 23 January 2021 00:23:45 David Christensen wrote:

> On 2021-01-22 15:35, David Christensen wrote:
> > On 2021-01-22 15:29, Gene Heskett wrote:
> >> Greeting all;
> >>
> >> I have a problem, using amanda, locally
> >> built. /usr/local/libexec/amanda/ambind needs to be setuid, but
> >> isn't.
> >>
> >> How or what do I do to fix it?
> >
> > How about chmod(1) as root?
> >
> > # chmod u+s /usr/local/libexec/amanda/ambind
>
> On 2021-01-22 16:09, Gene Heskett wrote:
>  > root@coyote:amanda-3.5.1$  chmod u+s
>  > /usr/local/libexec/amanda/ambind root@coyote:amanda-3.5.1$  su
>  > amanda -c "/usr/local/sbin/amcheck Daily" Amanda Tape Server Host
>  > Check
>  > -----------------------------
>  > ERROR: program /usr/local/libexec/amanda/ambind: not setuid-root
>  > NOTE: Holding disk '/sdb/dumps': 212792 MB disk space available,
>  > using 212292 MB
>  > Searching for label 'Dailys-3':found in slot 3: volume 'Dailys-3'
>  > Will write to volume 'Dailys-3' in slot 3.
>  > NOTE: skipping tape-writable test
>  > Server check took 0.103 seconds
>  > Amanda Backup Client Hosts Check
>  > --------------------------------
>  > ERROR: coyote: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: shop: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: lathe: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: GO704: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > ERROR: rpi4: selfcheck request failed: ambind: bind failed A:
>  > Permission denied
>  > Client check: 5 hosts checked in 11.298 seconds.  5 problems found.
>
> On 2021-01-22 17:39, Gene Heskett wrote:
>  > On Friday 22 January 2021 19:51:36 Larry Martell wrote:
>  >> Try chown root /usr/local/libexec/amanda/ambind
>  >>
>  >> and after that check that the suid bit is still set
>  >
>  > that fixed the ambind, but now have 132 problems with amgtar, no
>
> permission.
>
>  > tried to fix it with the same pill, get
>  > root@coyote:amanda-3.5.1$ ls -lh
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > -rwxr-x--- 1 root disk 158K Jan 22 20:17
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > Which says the setuid bit wasn't set so I reset it:
>  > root@coyote:amanda-3.5.1$ chmod u+s
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > root@coyote:amanda-3.5.1$ ls -lh
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > -rwsr-x--- 1 root disk 158K Jan 22 20:17
>
> /usr/local/libexec/amanda/application/amgtar
>
>  > but still get 132 copys of:
>  > selfcheck (etc does matter): error [exec
>
> /usr/local/libexec/amanda/application/amgtar: Permission denied]
>
>  > when running:su amanda -c "/usr/local/sbin/amcheck Daily"
>  >
>  > Something IMO has been updated in stretch's perl, that has totally
>
> screwed amanda.
>
>
> Sorry I missed the chown(1).  :-(
>
>
> But, building and installing Amanda from source is turning into a
> cluster f***.

That's also why I drive the build with a script so it has a constant set 
of ./configure options, and adding a new line to that set of config 
options that specs --without-ipv6 has turned into a permissions 
cluster-f--k. So as I said, I've been doing this since before there were 
official rpms for redhat-5.0 in 1998.
>
> I assumed you had some compelling reason not to use the official
> packages:
>
> 2021-01-22 21:18:42 dpchrist@tinkywinky ~
> $ cat /etc/debian_version ; uname -a
> 9.13
> Linux tinkywinky 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05)
> x86_64 GNU/Linux
>
> 2021-01-22 21:22:07 dpchrist@tinkywinky ~
> $ apt-cache search amanda | grep amanda
> amanda-client - Advanced Maryland Automatic Network Disk Archiver
> (Client) amanda-common - Advanced Maryland Automatic Network Disk
> Archiver (Libs) amanda-server - Advanced Maryland Automatic Network
> Disk Archiver (Server)
>
>
> But, I have had similar experiences building from source and I now
> avoid it like COVID-19.  Perhaps you should just use the Debian
> packages.
>
>
> David


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#231013

FromDavid Christensen <dpchrist@holgerdanske.com>
Date2021-01-23 09:30 +0100
Message-ID<BAmsW-3Fd-15@gated-at.bofh.it>
In reply to#231011
On 2021-01-22 22:40, Gene Heskett wrote:
> On Saturday 23 January 2021 00:23:45 David Christensen wrote:

>> But, building and installing Amanda from source is turning into a
>> cluster f***.
> 
> That's also why I drive the build with a script so it has a constant set
> of ./configure options, and adding a new line to that set of config
> options that specs --without-ipv6 has turned into a permissions
> cluster-f--k. So as I said, I've been doing this since before there were
> official rpms for redhat-5.0 in 1998.

Building, installing, and validating any given piece of software for a 
modern full-featured OS requires more knowledge and effort than I am 
willing to invest; especially when I install dozens of such packages.


I configure my networks with IPv4 and ignore IPv6.  Everything seems to 
work.


If I wanted Amanda, I would do:

# apt-get install amanda-server

and/or:

# apt-get install amanda-client


David

[toc] | [prev] | [next] | [standalone]


#231001

FromCharles Curley <charlescurley@charlescurley.com>
Date2021-01-23 01:40 +0100
Message-ID<BAf85-7Gj-3@gated-at.bofh.it>
In reply to#230990
On Fri, 22 Jan 2021 18:29:25 -0500
Gene Heskett <gheskett@shentel.net> wrote:

> I have a problem, using amanda, locally 
> built. /usr/local/libexec/amanda/ambind needs to be setuid, but isn't.
> 
> How or what do I do to fix it?

To give you something to work from, here's what I see on a working
amanda installation:

root@hawk:~# ll $( locate ambind)
-rwsr-x--- 1 root backup 14328 Nov  1  2018 /usr/lib/amanda/ambind*
root@hawk:~# file $( locate ambind)
/usr/lib/amanda/ambind: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=73f0a9e8b13c3121109114fcfb502afe10afed92, stripped
root@hawk:~# 

This is from the Debian package, version. 1:3.5.1-2+b2.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web