Problem:
Ruing a script as sudo retus
sudo: mount-remove-hiberfile: command not found
Info:
cybex@cybex-W55xEU:~$ echo $PATH //and 'sudo echo $PATH' retu the same path
/home/cybex/.rbenv/plugins/ruby-build/bin:/home/cybex/.rbenv/shims:/home/cybex/.rbenv/bin:/home/cybex/.rbenv/plugins/ruby-build/bin:/home/cybex/.rbenv/shims:/home/cybex/.rbenv/bin:/home/cybex/bin:/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/scripts:/snap/bin
root@cybex-W55xEU:/home/cybex# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/scripts
The script 'mount-remove-hiberfile' caot be run as a normal user, thus I would need to run sudo mount-remove-hiberfile.
Why does sudo not detect this script?
note: I have found a few questions regarding this but none which answered my question
برچسب:
نویسنده: استخدام کار