Some of the simoc-sam.py commands require root credential. simoc-sam.py is generally invoked through the sam alias, but it's not possible to use sudo with aliases, so sudo sam ... fails. There are a couple of solutions for this:
Convert sam to an executable and make it globally available;
Request the sudo password in the @needs_root decorator and use it to gain root credential before executing other commands (if possible);
Some of the
simoc-sam.py
commands require root credential.simoc-sam.py
is generally invoked through thesam
alias, but it's not possible to usesudo
with aliases, sosudo sam ...
fails. There are a couple of solutions for this:sam
to an executable and make it globally available;sudo
password in the@needs_root
decorator and use it to gain root credential before executing other commands (if possible);