Subject: Re: Re: "su -m" found in rc.d does not exist on my Linux
To: Jeremy C. Reed <reed@reedmedia.net>
From: Joel CARNAT <joel@carnat.net>
List: pkgsrc-users
Date: 07/31/2006 17:45:41
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Jul 31 2006 - 09:54, Jeremy C. Reed wrote:
> > + _doit=3D'/usr/bin/su -m vscan -c
> > '\''/bin/sh -c "/usr/pkg/bin/freshclam -c 2 -d"'\'''
> > + eval /usr/bin/su -m vscan -c ''\''/bin/sh' -c
> > '"/usr/pkg/bin/freshclam' -c 2 '-d"'\'''
> > ++ /usr/bin/su -m vscan -c '/bin/sh -c "/usr/pkg/bin/freshclam -c 2 -d"'
> > /bin/bash: vscan: No such file or directory
>=20
> What is that bash error for?
>=20
well... I don't really know...
I expect it to be from the rc.d script which is run by /bin/sh (which is
/bin/bash on slackware).
########################################################################
root@guarana:~# echo $SHELL
/bin/bash
root@guarana:~# /usr/pkg/share/examples/rc.d/freshclamd start
Starting freshclamd.
/bin/bash: vscan: No such file or directory
root@guarana:~# exec /bin/csh=20
%echo $SHELL
/bin/bash
%/usr/pkg/share/examples/rc.d/freshclamd start
Starting freshclamd.
/bin/bash: vscan: No such file or directory
########################################################################
> > I checked the "su" manpage and this Linux version has no "-m" flag.
> > I see mine is part of the 'shadow 4.0.3' package. It is still the case
> > in the bleeding-edge branch (meaning upgrade has to be manual).
>=20
> Your su from shadow at that version should have it since it had it way=20
> before that version and after. su -m is standard.
>=20
> Did you try running su -m manually to check?
>=20
yes I did.
########################################################################
root@guarana:~# /usr/bin/su -m vscan -c '/bin/sh -c "/usr/pkg/bin/freshclam=
-c 2 -d"'
/bin/bash: vscan: No such file or directory
root@guarana:~# /usr/bin/su -m ptijo -c '/bin/ls /'
/bin/bash: ptijo: No such file or directory
root@guarana:~# /usr/bin/su ptijo -c '/bin/ls /'
Linux-2.6.11.12-xenU boot etc lib mnt root sys usr
bin dev home lost+found proc sbin tmp var
root@guarana:~# /bin/csh=20
%/usr/bin/su -m ptijo -c '/bin/ls /'
/bin/bash: ptijo: No such file or directory
%/usr/bin/su ptijo -c '/bin/ls /'
Linux-2.6.11.12-xenU boot etc lib mnt root sys usr
bin dev home lost+found proc sbin tmp var
########################################################################
looks like the 'cu' command runs bash (or sh, which is a symlink to
bash) and '-m' makes it believe the next args is a command rather than a
username.
> Your error message above is caused by something else.
I didn't succeed in compiling the "shadow" package with the "new" su
command, so I can't tell for sure that it is "su" related.
But, in ChangeLog, from "shadow-4.0.14", I read:
########################################################################
<...>
2005-12-10 Tomasz K=B3oczko <kloczek@pld.org.pl>
<...>
* NEWS, src/su.c:
added handle -s/--shell, -m/-p/preserve-environment options like
GNU su
(based on patches from Debian submited by
Nicolas Fran=C3=A7ois <nicolas.francois@centraliens.net>)
<...>
########################################################################
This date corresponds to the release of "shadow-4.0.14".
Debian (sarge I think) seems to have a lower version too, but Zafer said
"<...>the option exists in all Linux distributions, I know." ; so I'm
puzzled :-/
--17pEHd4RhPHOinZp
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
iD8DBQFEziWl0/VH7L7F7Y4RAv69AJ9DCQR7STzjXHGl0pLcpYoARXn/lACghg9f
a5XcoBAC2KB+P5ZX+jgV2wc=
=RfRy
-----END PGP SIGNATURE-----
--17pEHd4RhPHOinZp--