Link to home
Start Free TrialLog in
Avatar of atorex
atorex

asked on

Linux bash scripting

Can someone help me with this issue Im having, I have a script to deploy new users and create a new group that will have sudo rights. I have the script ready and Im having issues with one line as per below
echo "## SSS user group sudo rights >> /etc/sudoers" & echo "%sss ALL=(ALL) ALL" >> /etc/sudoers

if I execute this locally it works fine but if I have it executed from an ssh session on a script I get an error like below

E420S ag # ssh 172.28.78.86 echo "%sss ALL=(ALL) ALL" >> /etc/sudoers
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `echo %sss ALL=(ALL) ALL'

appreciate any help
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of atorex
atorex

ASKER

thanks, I figured it was something dumb I didn't have, thanks for the help.