<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.14.3">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I have set up asterisk to run as non root, and allow admin users to log in to the server as asterisk, which gives them privileges to edit configs in the asterisk home directory.<BR>
<BR>
As for connecting to the console with 'asterisk -r' - this by default does not work as asterisk is owned stored in /usr/sbin/asterisk<BR>
<BR>
I am reading that the best way to solve this is to use 'visudo' - I added this:-<BR>
<BR>
asterisk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALL=/usr/sbin/asterisk -r&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NOPASSWD: ALL<BR>
asterisk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALL=/usr/sbin/safe_asterisk&nbsp;&nbsp;&nbsp;&nbsp; NOPASSWD: ALL<BR>
<BR>
Keep getting 'command not found' when logging in as 'asterisk' and trying to connect to the console<BR>
<BR>
when I do a 'sudo -l' as user asterisk - I get this<BR>
<BR>
&nbsp;&nbsp;&nbsp; user asterisk may run the following commands on this host:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ALL) NOPASSWD: ALL<BR>
<BR>
but still get command not found when trying to connect to the console - even after using 'sudo asterisk -r'<BR>
<BR>
If I use 'whereis asterisk' as user asterisk, I get:<BR>
<BR>
asterisk: /usr/sbin/asterisk /usr/sbin/asterisk.orig /usr/lib/asterisk /usr/include/asterisk /usr/include/asterisk.h /usr/share/man/man8/asterisk.8<BR>
<BR>
Suggesting that it can see it<BR>
<BR>
Does anyone have any advice on what the best practice on this would be? and allowing the user asterisk to connect to the console?<BR>
<BR>
Thanks<BR>
<BR>
Robert McNaught<BR>
<BR>
<BR>
</BODY>
</HTML>