ruby on rails - How to define Ubuntu sudoer permission for specific set of commands -
ruby on rails - How to define Ubuntu sudoer permission for specific set of commands -
to allow rails application run upstart commands via foreman gem, resorted providing sudoer definition below specific user. there variation of sudoers definition can provide list of linux commands passwordless sudo authorization?
my current sudoer definition bill all=(all) nopasswd:all
this allows user 'bill' run privileged commands without password. how can restrict 'bill' run next commands via sudo w/o password?
sudo service rails_app stop sudo service rails_app start sudo service rails_app restart
i tried next definition, received syntax error when saving visudo edit.
bill localhost=(service rails_app stop, service rails_app start, service rails_app restart) nopasswd:all
the simplest file be:
bill all=(all) nopasswd:/usr/bin/service rails_app stop bill all=(all) nopasswd:/usr/bin/service rails_app start bill all=(all) nopasswd:/usr/bin/service rails_app restart
ruby-on-rails ubuntu foreman sudoers
Comments
Post a Comment