bash - Update root crontab remotely for many systems by script -


i trying update crontab file of 1000+ systems using loop jump host.

the below doesn't work.

echo -e 'pass365\!\n' | sudo -s echo 'hello' >> /var/spool/cron/root -bash: /var/spool/cron/root: permission denied 

i have (all) in sudoers file.

this solution;

echo 'pass365\!' | sudo -s bash -c 'echo "hello">> /var/spool/cron/root' 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -