I have a log file that was created by
nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file.
My first thought was to:
$ sudo su nobody This account is currently not available.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
An email thread:
.. points out that
sudo -u nobody [cmd ...] can be used:
(Combined with the trick of How to append to a file as sudo)
echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log