You are not logged in.
Pages: 1
Maybe already solved the issue of internet using from the user tux?
I can connect to internet via my modem and wvdial only as root. It is easy. I use script:
[c]
#!/bin/sh
subox xterm -hold -e "wvdial -C /home/tux/mts.wvdial.conf"
[/c]
Double click script, enter, done.
I can browse internet in midori as root:
Menu → Run → subox midori
And I can't use Mercurial (hg) as tux.
[c]
tux@slitaz:~/tests$ hg clone http://hg.slitaz.org/spk
abort: error: Name or service not known
tux@slitaz:~/tests$ su
Password:
root@slitaz:/home/tux/tests# hg clone http://hg.slitaz.org/spk
destination directory: spk
requesting all changes
adding changesets
adding manifests
adding file changes
added 13 changesets with 26 changes to 9 files
updating to branch default
9 files updated, 0 files merged, 0 files removed, 0 files unresolved
[/c]
I commanded:
[c]
# addgroup tux dialout
# addgroup tux wheel
[/c]
log out and log in, but nothing has changed.
[c]
tux@slitaz:~$ ls -l /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 May 15 01:02 /dev/ttyACM0
crw-rw---- 1 root dialout 166, 1 May 14 22:27 /dev/ttyACM1
crw-rw---- 1 root dialout 166, 2 May 14 22:27 /dev/ttyACM2
crw-rw---- 1 root dialout 166, 3 May 14 22:27 /dev/ttyACM3
[/c]
Offline
It's because pppd keeps changing resolv.conf to 600 (read/write for root only).
The quick fix for it is to modify /etc/ppp/ip-up and /etc/ppp/ip-down to correct this automatically:
/etc/ppp/ip-up:
[c]#!/bin/sh
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
rm -f /etc/ppp/resolv.prev
if [ -f /etc/resolv.conf ]; then
cp /etc/resolv.conf /etc/ppp/resolv.prev
grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
cat /etc/ppp/resolv.conf >> /etc/resolv.conf
chmod 644 /etc/resolv.conf
else
cp /etc/ppp/resolv.conf /etc
chmod 644 /etc/resolv.conf
fi
fi[/c]
/etc/ppp/ip-down:
[c]#!/bin/sh
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
if [ -f /etc/ppp/resolv.prev ]; then
cp -f /etc/ppp/resolv.prev /etc/resolv.conf
chmod 644 /etc/resolv.conf
else
rm -f /etc/resolv.conf
fi
fi[/c]
Offline
Thank You, Brenton!
You point me to right direction. I just changed permissions for /etc/resolv.conf and started wvdial from tux user.
I not changed scripts. Now, when I run wvdial (and pppd):
[c]
tux@slitaz:~$ ls -l /etc/ppp/resolv.conf
-rw-r--r-- 1 root root 48 May 15 14:56 /etc/ppp/resolv.conf
[/c]
When scripts ip-up & ip-down copy /etc/ppp/resolv.conf to /etc/resolv.conf then permissions may back to 600?
Offline
Yes, but it originally copied the /etc/ppp/resolv.conf from /etc/resolv.conf - this is also why connecting for the first time on a fresh install always works and the second time gives you the error. Replacing the scripts is the fastest and easiest way to fix it without having to change /etc/resolv.conf permission.
Offline
Pages: 1
[ Generated in 0.020 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]