Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-31-2005, 09:54 AM   #1
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
connect wvdial as non-root user?

I use wvdial to connect to the internet. However, for some reason I have to run it as root or using sudo. When I try running wvdial as an unprivileged user, I get

--> WvDial: Internet dialer version 1.54.0
--> Cannot open /dev/ttySHSF0: Device or resource busy
--> Cannot open /dev/ttySHSF0: Device or resource busy
--> Cannot open /dev/ttySHSF0: Device or resource busy
If I make wvdial setuid and setgid root, it all works fine. I'd like to avoid running wvdial as stuid and setgid if at all possible.

I've checked the permissions on /dev/ttySHSF0 (the modem) and they seem fine:

crw-rw-rw-  1 root uucp 240, 64 Jul 31 15:48 /dev/ttySHSF0
How can I make wvdial work under a normal user account or isn't it possible?
Old 08-01-2005, 12:22 AM   #2
Registered: Jun 2004
Location: Denton
Distribution: debian, freebsd
Posts: 121

Rep: Reputation: 15
you can do one of two things.

create a group called something like 'dialout'. change the ownership/permissions of your /dev/ttySxxx to allow everyone from the group 'dialout' to be able to use the modem. then, add yourself to that group.

or, "sudo wvdial".

Old 08-01-2005, 01:44 AM   #3
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
check all this before you go typing (paths and what it is already and whatnot)
pppd has to be setuid root (can't get around that one and i thing it's designed to be safe)
make and then add yourself to dialup group in /etc/group like fenderman said
chmod g+w dialup /dev/ttyS0
(fix it in udev rules later)
chmod g+w dialup /etc/ppp/pap-secrets /etc/ppp/chap-secrets

it is kind of bad to run wvdial as sudo or suid just because the authors didn't intend but alot of people do it with no ill effects
Old 08-01-2005, 01:53 AM   #4
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
you may also need to change the permissions in files like /etc/resolv.conf or /etc/ppp/resolv.conf if you get the ISP's DNS servers automatically on dial-up.
I would suggest using sudo. Make sure you have the latest sudo, because If I remember correct they found a security vulnerability in sudo recently. The group thing sound also correct to me.

Last edited by perfect_circle; 08-01-2005 at 01:55 AM.
Old 08-01-2005, 02:37 AM   #5
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Original Poster
Rep: Reputation: 30
Thanks for all the input. The thing I don't understand though is why I can't access the modem as an unprivileged user, because its permissions are set to

crw-rw-rw-  1 root uucp 240, 64 Jul 31 15:48 /dev/ttySHSF0
So in theory I shouldn't have to add myself to any new groups. Unless I'm misssing something.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you connect to internet as normal user without run pppd as root ? nasty_daemon Linux - Networking 2 09-13-2005 01:43 AM
pan doesnt connect as user only as root madcow007 Linux - Software 0 06-27-2005 07:58 PM
cannot connect using wvdial under Fedora Basel Fedora 0 03-28-2004 11:24 AM
Connect to mysql as non root(linux) user dublinclontarf Slackware 1 02-09-2004 04:19 AM
Connect to Win2K RAS via wvdial adamsjw2 Linux - Networking 3 01-26-2003 09:57 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration