[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: prob , PATH inheritage | early modment , sudo , wsl deb
From: |
alex xmb sw ratchev |
Subject: |
Re: prob , PATH inheritage | early modment , sudo , wsl deb |
Date: |
Sat, 10 Feb 2024 15:06:48 +0100 |
On Sat, Feb 10, 2024, 13:35 Kerin Millar <kfm@plushkava.net> wrote:
> On Sat, 10 Feb 2024 04:04:55 +0100
> alex xmb sw ratchev <fxmbsw7@gmail.com> wrote:
>
> > i have :
> > wsl debian , starting that windows app brings up terminal and normal user
> > is logged in
> >
> > i wanna do :
> > auto login to root , and have the from-user /mnt/c/*windows* PATHs
> >
> > i did :
> > a login bashrc / profile that saves the extra paths to a var
> > and have /root/*somebashrc* add that to PATH
> > cause i couldnt make it neither inherit nor early-add , to PATH ,
> BASH_ENV
> > nor --init-file worked
> >
> > my cmdline :
> > sudo HOME=/root sps="${PATH#*:/bin:}" bash -l < optional args bad code >
> >
> > ? why only rc file in /root fix this problem ?
> >
> > i had tried and failed :
> > a_code = printf %s\\n 'PATH+=:$sps'
> > sudo BASH_ENV=<( a_code ) bash -l
> > sudo bash --init-file <( a_code ) -l
> > sudo bash --init-file /dev/fd/3 3< <( a_code )
>
> LESS=+/closefrom man sudoers
>
> Press 'n' until you land on the description of closefrom, which states the
> following:
>
> "Before it executes a command, sudo will close all open file descriptors
> other than standard input, standard output, and standard error (file
> descriptors 0-2)."
>
aha , cool .. thxx for sending me on my way
> --
> Kerin Millar
>
- prob , PATH inheritage | early modment , sudo , wsl deb, alex xmb sw ratchev, 2024/02/09
- Re: prob , PATH inheritage | early modment , sudo , wsl deb, alex xmb sw ratchev, 2024/02/09
- Re: prob , PATH inheritage | early modment , sudo , wsl deb, Kerin Millar, 2024/02/10
- Re: prob , PATH inheritage | early modment , sudo , wsl deb,
alex xmb sw ratchev <=