comments - How to replace a commented line in sudoers file with sed via Salt Stack? -


hi change following line in /etc/sudoers file on of salt minions.

# %wheel        all=(all)       nopasswd: 

with following:

%wheel          all=(all)       nopasswd: /usr/bin/salt* 

so far have tried following command along plethora of similar commands different options/syntax:

sed -i '/# %wheel        all=(all)       nopasswd: all/c %wheel          all=(all)       nopasswd: /usr/bin/salt*' /etc/sudoers 

i don't error message particular command, file not updated.

could provide me correct option/syntax specific use?

$ sed -i 's|# \(.*\)all|\1/usr/bin/salt*|' /etc/sudoers 

Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -