<div dir="auto">It’s the config, not the init script.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 16, 2022 at 3:41 PM Elliot Johnson <<a href="mailto:elliot.johnson@hayley-group.co.uk">elliot.johnson@hayley-group.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Hey, thanks for the response 🙂<br>
<br>
I have already tried deleting the line and retyping to weed out any odd characters, but no luck.<br>
<br>
This is the cat output:<br>
<br>
[root@g000063 ejohnson]# cat -n /etc/rc.d/init.d/tac_plus<br>
1 #!/bin/bash<br>
2 #<br>
3 # description: Cisco's tacacs+ access, authorization, and accounting server.<br>
4 # chkconfig: 345 15 85<br>
5 #<br>
6 ### BEGIN INIT INFO<br>
7 # Provides: tacacs tacacs+ tac_plus<br>
8 # Required-Start: $network<br>
9 # Required-Stop: $network<br>
10 # Default-Start: 3 4 5<br>
11 # Short-Description: TACACS+ server based on Cisco source release<br>
12 # Description: Starts and stops tac_plus TACACS+ server<br>
13 ### END INIT INFO<br>
14<br>
15 # Source function library.<br>
16 . /etc/rc.d/init.d/functions<br>
17<br>
18 # Source networking configuration.<br>
19 . /etc/sysconfig/network<br>
20<br>
21 # Check that networking is up.<br>
22 [ ${NETWORKING} = "no" ] && exit 0<br>
23<br>
24 CONFIG=/etc/tac_plus.conf<br>
25<br>
26 [ -f $CONFIG ] || exit 1<br>
27<br>
28 [ -r /etc/sysconfig/tac_plus ] && . /etc/sysconfig/tac_plus<br>
29<br>
30 # See how we were called.<br>
31 case "$1" in<br>
32 start)<br>
33 # Start daemons.<br>
34 echo -n "Starting tacacs+: "<br>
35 daemon /usr/bin/tac_plus -C $CONFIG ${LOGFILE:+-l $LOGFILE} ${WHOLOG:+-w $WHOLOG} ${DEBUG_LEVEL:+-d $DEBUG_LEVEL}<br>
36 RETVAL=$?<br>
37 echo<br>
38 [ $RETVAL == 0 ] && touch /var/lock/subsys/tac_plus<br>
39 ;;<br>
40 stop)<br>
41 # Stop daemons.<br>
42 echo -n "Shutting down tacacs+: "<br>
43 killproc tac_plus<br>
44 RETVAL=$?<br>
45 echo<br>
46 [ $RETVAL == 0 ] && rm -f /var/lock/subsys/tac_plus<br>
47 ;;<br>
48 status)<br>
49 status tac_plus<br>
50 exit $?<br>
51 ;;<br>
52 restart)<br>
53 $0 stop<br>
54 $0 start<br>
55 exit $?<br>
56 ;;<br>
57 reload)<br>
58 kill -USR1 `cat /var/run/tac_plus.pid`<br>
59 ;;<br>
60 *)<br>
61 echo "Usage: tacacs {start|stop|status|restart|reload}"<br>
62 exit 1<br>
63 esac<br>
64 exit $RETVAL<br>
[root@g000063 ejohnson]#<br>
<br>
Elliot Johnson - Infrastructure Manager - Group IT<br>
Hayley Group Limited<br>
Shelah Road, Halesowen, West Midlands, B63 3PG, England<br>
[Tel] +44 (0)121 585 5334 | [Email] <a href="mailto:elliot.johnson@hayley-group.co.uk" target="_blank">elliot.johnson@hayley-group.co.uk</a><mailto:<a href="mailto:elliot.johnson@hayley-group.co.uk" target="_blank">elliot.johnson@hayley-group.co.uk</a>><br>
________________________________<br>
From: Philip Prindeville <<a href="mailto:philipp_subx@redfish-solutions.com" target="_blank">philipp_subx@redfish-solutions.com</a>><br>
Sent: 16 May 2022 20:16<br>
To: heasley <<a href="mailto:heas@shrubbery.net" target="_blank">heas@shrubbery.net</a>><br>
Cc: Elliot Johnson <<a href="mailto:elliot.johnson@hayley-group.co.uk" target="_blank">elliot.johnson@hayley-group.co.uk</a>>; <a href="mailto:tac_plus@shrubbery.net" target="_blank">tac_plus@shrubbery.net</a> <<a href="mailto:tac_plus@shrubbery.net" target="_blank">tac_plus@shrubbery.net</a>><br>
Subject: Re: [tac_plus] Please help with tac_plus<br>
<br>
<br>
<br>
> On May 16, 2022, at 12:42 PM, heasley <<a href="mailto:heas@shrubbery.net" target="_blank">heas@shrubbery.net</a>> wrote:<br>
><br>
> Mon, May 16, 2022 at 05:27:09PM +0000, Elliot Johnson:<br>
>> Hello,<br>
>><br>
>> We are trying to run tac_plus version F4.0.4.26 on a CentOS 7 box.<br>
>><br>
>> We have a config with a group section like this:<br>
>><br>
>> group = netadmin {<br>
>> default service = permit<br>
>> acl = hgl<br>
>> service = exec {<br>
>> priv-lvl = 15<br>
>> }<br>
>> }<br>
>><br>
>> When we start the tac_plus process, we get this reported by systemd:<br>
>><br>
>> May 16 18:23:06 g000063 tac_plus[19305]: /etc/rc.d/init.d/tac_plus: line 22: [: =: unary operator expected<br>
>><br>
>> Line 22 is "default service = permit"<br>
>><br>
>> What is the syntax we should use for this config entry? All the online guides only suggest what we have already put.<br>
><br>
> Your syntax looks correct. I expect that you either have unprintable<br>
> characters on line 22 or there is an error on a preceding line that is<br>
> trickling down to line 22.<br>
><br>
<br>
<br>
Is it the config file it's complaining about, or the init.d script? Can you include "cat -n /etc/rc.d/init.d/tac_plus"?<br>
<br>
<br>
<br>
Company No: 1257303 VAT No: GB 292 0546 04 The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is strictly prohibited and may be unlawful. If you received this e-mail in error, please contact the sender immediately and delete the material from any computer. The views expressed in this e-mail may not necessarily be the views of Hayley Group Limited and should not be taken as authority to carry out any instruction contained within.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.shrubbery.net/pipermail/tac_plus/attachments/20220516/8d88198a/attachment.htm" rel="noreferrer" target="_blank">http://www.shrubbery.net/pipermail/tac_plus/attachments/20220516/8d88198a/attachment.htm</a>><br>
_______________________________________________<br>
tac_plus mailing list<br>
<a href="mailto:tac_plus@www.shrubbery.net" target="_blank">tac_plus@www.shrubbery.net</a><br>
<a href="https://www.shrubbery.net/mailman/listinfo/tac_plus" rel="noreferrer" target="_blank">https://www.shrubbery.net/mailman/listinfo/tac_plus</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>--</div>John Fraizer<div>LinkedIn profile: <a href="http://www.linkedin.com/in/johnfraizer/" target="_blank">http://www.linkedin.com/in/johnfraizer/</a></div><div><br><div><span style="color:rgb(53,53,53);font-family:Arial,sans-serif;font-size:12px;line-height:12px;background-color:rgb(244,244,244)"><br></span></div></div></div></div>