asterisk user

Mark Purcell msp@debian.org
Tue, 12 Apr 2005 18:03:00 +0100


Ah I see what you are doing,
you are still using the Debian GNU/Linux stable release, which is over
two years old.

Debian is about to release a new version, called sarge, which will
contain the updated asterisk packages.

Have a look at http://packages.debian.org/asterisk for the details and
availability of the newer packages.

Also your example below you shouldn't run asterisk as root as it will
muck up the permissions for things like the pid file.

In the example below your asterisk.pid file is now owned by root, which
is why asterisk can't start as the asterisk user.

Mark

On Tue, Apr 12, 2005 at 08:18:25AM +0100, Simon Newton wrote:
> Hi there. Thanks for the reply.
> 
> > Which version are you running and how did you install?
> 
> I used the apt-get utility to install asterisk. Version info below.
> 
> To be sure, I did apt-get update, apt-get install asterisk and a few others
> to show you version and example of the process running as root:
> 
> nexus:~# apt-get update
> Hit http://security.debian.org stable/updates/main Packages
> Hit http://security.debian.org stable/updates/main Release
> Hit http://security.debian.org stable/updates/contrib Packages
> Hit http://security.debian.org stable/updates/contrib Release
> Hit http://security.debian.org stable/updates/non-free Packages
> Hit http://security.debian.org stable/updates/non-free Release
> Hit http://non-us.debian.org stable/non-US/main Packages
> Hit http://non-us.debian.org stable/non-US/main Release
> Hit http://non-us.debian.org stable/non-US/contrib Packages
> Hit http://non-us.debian.org stable/non-US/contrib Release
> Hit http://non-us.debian.org stable/non-US/non-free Packages
> Hit http://non-us.debian.org stable/non-US/non-free Release
> Hit http://non-us.debian.org stable/non-US/main Sources
> Hit http://non-us.debian.org stable/non-US/main Release
> Hit http://non-us.debian.org stable/non-US/contrib Sources
> Hit http://non-us.debian.org stable/non-US/contrib Release
> Hit http://non-us.debian.org stable/non-US/non-free Sources
> Hit http://non-us.debian.org stable/non-US/non-free Release
> Hit http://ftp.cpanel.net stable/main Packages
> Hit http://ftp.cpanel.net stable/main Release
> Hit http://ftp.cpanel.net stable/main Packages
> Hit http://ftp.cpanel.net stable/main Release
> Hit http://www.uk.debian.org stable/main Packages
> Hit http://www.uk.debian.org stable/main Release
> Hit http://www.uk.debian.org stable/non-free Packages
> Hit http://www.uk.debian.org stable/non-free Release
> Hit http://www.uk.debian.org stable/contrib Packages
> Hit http://www.uk.debian.org stable/contrib Release
> Hit http://www.uk.debian.org stable/main Sources
> Hit http://www.uk.debian.org stable/main Release
> Hit http://www.uk.debian.org stable/non-free Sources
> Hit http://www.uk.debian.org stable/non-free Release
> Hit http://www.uk.debian.org stable/contrib Sources
> Hit http://www.uk.debian.org stable/contrib Release
> Reading Package Lists... Done
> Building Dependency Tree... Done
> 
> nexus:~# apt-get install asterisk
> Reading Package Lists... Done
> Building Dependency Tree... Done
> Sorry, asterisk is already the newest version.
> 0 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
> 
> nexus:~# asterisk -V
> Asterisk CVS-v1-0-12/19/04-12:27:05
> 
> nexus:~# ps auwx | grep asterisk
> root     27926  0.0  0.0  2296 1020 ?        S    Apr10   0:00 /bin/sh
> /usr/sbin/safe_asterisk
> root     31896  0.0  1.3 78252 13588 ?       Sl   Apr11   0:09
> asterisk -vvvg -c
> root       588  0.0  0.0  1548  452 pts/0    S+   07:11   0:00 grep asterisk
> 
> I see there is a user called asterisk, so I su to that user:
> 
> nexus:~# su asterisk
> nexus:/root$ /usr/sbin/safe_asterisk
> nexus:/root$ Asterisk ended with exit status 127
> Asterisk died with code 127.
> Automatically restarting Asterisk.
> 
> nexus:/root$ /usr/sbin/asterisk
> Unable to open pid file '/var/run/asterisk.pid': Permission denied
> 
> 
> Ill just try a full uninstall/reinstall to see if that helps.
> 
> S
> ----- Original Message ----- 
> From: "Mark Purcell" <msp@debian.org>
> To: "Simon Newton" <simon@plexus-internet.com>
> Sent: Monday, April 11, 2005 10:16 PM
> Subject: Re: asterisk user
> 
> 
> > Hi Simon,
> >
> > The Debian GNU/Linux version of asterisk does not run as root.
> >
> > It has been running as the asterisk user since at least 2002 with
> > version 0.1.11-4.
> >
> > Which version are you running and how did you install?
> >
> > Mark
> >
> > On Mon, Apr 11, 2005 at 09:01:49PM +0100, Simon Newton wrote:
> > > Hi there,
> > > I was just wondering why the standard debian asterisk install runs as
> the very insecure root user?
> > >
> > > Any change of having the deb package conf itself as a seperate user? Id
> rather stick with the deb install, rather than use source.
> > >
> > > Thanks
> > >
> > > Simon
> >
>