Skip to Content
Asterisk: The Future of Telephony, 2nd Edition
book

Asterisk: The Future of Telephony, 2nd Edition

by Jim Van Meggelen, Jared Smith, Leif Madsen
August 2007
Intermediate to advanced
608 pages
20h 33m
English
O'Reilly Media, Inc.
Content preview from Asterisk: The Future of Telephony, 2nd Edition

Running Asterisk As a Non-root User

By default, Asterisk runs as the root user, and while we don’t have any hard data, our own experiences lead us to conclude that the vast majority of Asterisk systems are run in this default state. From a security perspective, this represents an unacceptable risk―strangely, one which most of us seem willing to take.

Running Asterisk as non-root is not terribly hard to achieve, but it requires a few extra steps, and debugging it can be frustrating if you do not understand how Linux permissions work. However, from a security perspective it is well worth the effort.

We’re going to run Asterisk as the user asterisk, so we need to create that user on our system first. The following commands will be run as root. We’ll tell you when to switch and use the asterisk user that we’re about to create:

# adduser -c "Asterisk PBX" asterisk
#passwd asterisk

Now that you’ve created the asterisk user, let’s switch to that user, with which we’ll perform the rest of the commands. Once we su to the asterisk user,[141] we can download a copy of Asterisk via SVN, FTP or WGET, and then compile and install. We’re going to grab a copy of Asterisk from the SVN repository in the following example.

Note

1.4.5 is the current release version at the time of this writing, but it won’t be by the time you read this, so check the Asterisk web site for the latest version. In other words, don’t just type 1.4.5 whenever you see us refer to it. Find out what is current and use that instead. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Asterisk: The Future of Telephony

Asterisk: The Future of Telephony

Jim Van Meggelen, Jared Smith, Leif Madsen
Switching to VoIP

Switching to VoIP

Theodore Wallingford

Publisher Resources

ISBN: 9780596510480Errata Page