Tux

...making Linux just a little more fun!

Vector Linux how to question

Vesna [greemlimusine at chariot.net.au]


Fri, 19 Sep 2008 06:07:44 +1000

Hi I a, new to Linux I have installed Vector Linux on my machine but unfortunately where I live only dial up internet is available and I can only dial up the internet if I am signed in as root, if I sign in with the other account, chestnut dialer will not dial up at all it keeps telling me it cannot open the modem, is there a way to be able to use the other account to dial up the internet since I keep getting the warning message that I shouldn't run the computer in root?Thanks Vesna


Top    Back


Neil Youngman [ny at youngman.org.uk]


Thu, 18 Sep 2008 08:26:16 +0100

On Thursday 18 September 2008 21:07, Vesna wrote:

> Hi I a, new to Linux I have installed Vector Linux on my machine but
> unfortunately where I live only dial up internet is available and I can
> only dial up the internet if I am signed in as root, if I sign in with
> the other account, chestnut dialer will not dial up at all it keeps
> telling me it cannot open the modem, is there a way to be able to use
> the other account to dial up the internet since I keep getting the
> warning message that I shouldn't run the computer in root?Thanks Vesna

I'm not familiar with Vector Linux, but in most distributions the usual solution is to add your user to the group that "owns" the modem.

http://www.linuxforums.org/forum/slackware-linux-help/84737-dial-up-modem-works-fine-root-but-permission-denied-ttys0-when-user-tries.html suggests that for vector the required group is "dialout".

HTH

Neil Youngman


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Thu, 18 Sep 2008 09:43:38 -0400

On Fri, Sep 19, 2008 at 06:07:44AM +1000, Vesna wrote:

> Hi I a, new to Linux I have installed Vector Linux on my machine but 
> unfortunately where I live only dial up internet is available and I can 
> only dial up the internet if I am signed in as root, if I sign in with 
> the other account, chestnut dialer will not dial up at all it keeps 
> telling me it cannot open the modem, is there a way to be able to use 
> the other account to dial up the internet since I keep getting the 
> warning message that I shouldn't run the computer in root?Thanks Vesna

As Neil has already suggested, you probably need to add yourself to the group that has the permissions to use the modem device. I'll walk through the procedure in detail, since this is a common admin task and comes in useful in other places (e.g., allowing only a certain group to use a given directory, for instance.)

First, check the ownership and permissions on your modem device. E.g., if it's /dev/ttyS0 (the first serial port), issue the "ls -l" command:

ben@Tyr:/tmp$ ls -l /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 2008-09-18 08:21 /dev/ttyS0

Mine is correctly set up - it's a "c"haracter device, belonging to "root" and with group set to "dialout", with read and write permissions set for owner and group.

In the general case, that's exactly what it should be. Note that the group name isn't critical - it may be something other than "dialout" on some systems; what's important is that the group exists and that the users who are allowed to use the device belong to it. The permissions should be set so that the owner and the group (but no one else) can both read from and write to the device; this allows for nicely granular control on systems with many users.

Let's assume that all of this is completely wrong on /dev/ttyS0, and we need to set it all up; in fact, let's assume that the "dialout" group does not exist, and that we need to grant modem use permissions to user 'bob'. Here's how that would go (note that you need to be root to do this):

addgroup dialout                    # Create the group
chown root:dialout /dev/ttyS0       # Set the owner/group
chmod 660 /dev/ttyS0                # Set read/write perms for owner/group
adduser bob dialout                 # Add 'bob' to 'dialout'

Note that if "bob" is logged in, he'll have to log out and log back in for the group membership change to take effect.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back