Tinycore is here 12/1/2008! Welcome visitors.
Code: [Select]sudo -u tc -exec ($@).
sudo -u tc -exec ($@).
sudo -u `CAT /etc/sysconfig/tcuser`
Hi nick65goQuote from: nick65go on August 18, 2021, 02:28:15 PMCode: [Select]sudo -u tc -exec ($@).Now you are the one assuming that $USER = tc. If you are going to sudo -u then at least do it like this:Code: [Select]sudo -u `CAT /etc/sysconfig/tcuser`Sorry for the uppercase cat , forum error.
Hi Roberto A. FogliettaThe attachment you posted shows sudo - instead of sudo -u
su - $user -c "$0 $*"
sudo -u tc -exec ($@)
... I am not using sudo: ...
tc@E310:~/su$ su `cat /etc/sysconfig/tcuser` -c "touch 1"tc@E310:~/su$ ls -ltotal 0-rw-r--r-- 1 tc staff 0 Aug 19 10:28 1tc@E310:~/su$