[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weird set -u error



On Sat, 27 Aug 2022, tomas@tuxteam.de wrote:

On Sat, Aug 27, 2022 at 11:22:09AM +1000, David wrote:
On Sat, 27 Aug 2022 at 10:27, Greg Wooledge <greg@wooledge.org> wrote:

Has anyone managed to reproduce the OP's results, either getting
"interactive" from a bash -c call, or seeing *any* evidence that
/etc/bash.bashrc or ~/.bashrc is sourced from a bash -c call?

On Debian 11, when I create a test user, login on a console as that
user, and duplicate the recipe provided in the original message[1],
the reported problem does NOT occur:

Aha...

so main suspects are now ~/.bash_profile ~/.inputrc or some exported
environment lying around...

Cheers


This just gets weirder and weirder.

It looks like it's related to logging in with ssh:

I am running a modified ssh. It's been patched to allow cipher None and
I've backported from sid

I had to jump through some hoops to login at the console but now:

aptmirror17 login: apt-mirror
Password: Linux aptmirror17.home.woodall.me.uk 5.10.0-16-amd64 #1 SMP Debian
5.10.127-2 (2022-07-23) x86_64

The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Aug 27 06:22:26 UTC 2022 on hvc0
sourcing /etc/bash.bashrc
apt-mirror@aptmirror17:~$ ( bash -cu : )
apt-mirror@aptmirror17:~$


apt-mirror@aptmirror17:~$ ssh aptmirror17
Enter passphrase for key '/var/spool/apt-mirror/.ssh/id_rsa': Linux aptmirror17.home.woodall.me.uk 5.10.0-16-amd64 #1 SMP Debian
5.10.127-2 (2022-07-23) x86_64

The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Aug 27 06:23:12 2022
apt-mirror@aptmirror17:~$ ( bash -cu : )
/etc/bash.bashrc: line 7: PS1: unbound variable

apt-mirror@aptmirror17:/mnt/mirror/local-debs$ ssh -V
OpenSSH_9.0p1 Debian-1+~tjw11r1, OpenSSL 1.1.1n  15 Mar 2022



Downgrading ssh back to the version from bullseye shows it's not my
local changes:

apt-mirror@aptmirror17:~$ ssh aptmirror17
Enter passphrase for key '/var/spool/apt-mirror/.ssh/id_rsa': Linux aptmirror17.home.woodall.me.uk 5.10.0-16-amd64 #1 SMP Debian
5.10.127-2 (2022-07-23) x86_64

The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Aug 27 06:36:10 2022 from
2001:8b0:bfcd:100:216:3eff:fee0:7107
apt-mirror@aptmirror17:~$ ( bash -cu : )
/etc/bash.bashrc: line 7: PS1: unbound variable
apt-mirror@aptmirror17:~$

apt-mirror@aptmirror17:~$ ssh -V
OpenSSH_8.4p1 Debian-5+deb11u1, OpenSSL 1.1.1n  15 Mar 2022
apt-mirror@aptmirror17:~$



Reply to: