When i am trying in solaris its throughing the below error
#cat / usr / local / etc / sudoers | grep -i unix unix ALL =(ALL)NOPASSWD:ALL root on test:
sed: illegal option -- i
root on test:</tmp>
我已经尝试了这个也没有用
root on test: </tmp>
$ sudo perl -pi -e 's/^\s*\(unix\s*ALL=(ALL)\s*NOPASSWD:\s*ALL\)/#\1/' /usr/local/etc/sudoers
root on test: </tmp>
cat /usr/local/etc/sudoers |grep -i unix
unix ALL=(ALL) NOPASSWD: ALL
sed -i -e 's/^\s*\(unix\s*ALL=(ALL)\s*NOPASSWD:\s*ALL\)/#\1/' /usr/local/etc/sudoers but the same script is working on linux