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

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -