LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-31-2005, 09:54 AM   #1
cdhgee
Member
 
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

Code:
--> 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:

Code:
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
fenderman11111
Member
 
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".

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

Rep: Reputation: 53
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
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
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
cdhgee
Member
 
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

Code:
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:42 AM.

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