slackware on home network issues

Place to discuss Slackware
User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Oct 30, 2003 2:49 pm

Calum wrote:like opera which will seemingly only run if run from within its directory
For a quick hack on something like that just edit the script and make the second line (right after the #!/blah/blah) something like this:

cd /path/to/opera

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Sat Nov 01, 2003 7:31 pm

yes, i did something of that order, and the thing is i want to be able to get it so i can also type opera <filename> or opera <url> as well. At the moment i have a script which does:

Code: Select all

#!/bin/bash

dir=`pwd`

cd /opt/opera;
./opera $dir/$1
exit 0
in order to try and get it to work in some fashion.
this way it works if you do opera <filename> (whether you specify the full path or not), but displays my home directory rather than my home page when just 'opera' is used. also, doesn't do urls.

this is just a little script that i called "opera" and stuck into /usr/local/bin which is what i do with these little one line scripts and symlinks etc.

so the idea is that i can change the script every now and again to get the idea of how to get it going properly using all those things (url, filename etc).

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Mon Nov 03, 2003 2:30 pm

Calum wrote:yes, i am up and networking however i have another question, not network related, system related, but related to the issue at hand too:

when i boot the system with the machine's network interface card plugged into the gateway (if that's what i call it) it all works fab, and i am connected to the internet from go.

if i boot the computer when it is not plugged in, and then decide to connect to the Internet, the best way it looks like is to su to root and then run the startup script /etc/rc.d/rc.inet1 (this script listed above) which gets it all going right enough.

my question is this: how can i allow a normal user to run a simple command (say called "internet" or similar) without having to su to root, which will connect to the internet using all the right settings etc. Also, i imagine that running inet1 is not the best way to get the connection up and i wonder what the best method is.

Any ideas?
again, thanks beforehand.
I see that you have solved it but what is the output when you do /etc/rc.d/rc.inet1 as a user?? I can execute it as a user in slack. But it could be that you just cant execute dhcpcd (which inet1 will call for dhcp) as a user.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Nov 04, 2003 4:49 pm

calum@claudia:~/downloads$ /etc/rc.d/rc.inet1
SIOCSIFADDR: Permission denied
SIOCSIFFLAGS: Permission denied
SIOCADDRT: Operation not permitted
Attempting to configure eth0 by contacting a DHCP server...
**** /sbin/dhcpcd: not a superuser
is what i get, so what do you think?
Last edited by Calum on Thu Jan 11, 2007 3:54 pm, edited 1 time in total.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Jan 11, 2007 1:42 pm

well, slack 11 now, at home with desktop PC (harvey) through a normal wired router through a asdl modem. in slack i can't seem to internet at all. I don't know why. I have done a lot of plugging out and in and so on. I have used the internet fine several times since installing slack, but ever since i replaced a duff cable, i cannot really get the internet going. aha! you may say, there's your problem. not really. i am now using the exact same hardware through windows 2000 (which is still here because of university etc etc). anyway, from slack:
calum@harvey ~ $ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.431 ms
64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=0.441 ms
64 bytes from 192.168.0.1: icmp_seq=12 ttl=64 time=0.438 ms
64 bytes from 192.168.0.1: icmp_seq=19 ttl=64 time=0.441 ms
64 bytes from 192.168.0.1: icmp_seq=24 ttl=64 time=0.445 ms
64 bytes from 192.168.0.1: icmp_seq=26 ttl=64 time=0.433 ms
64 bytes from 192.168.0.1: icmp_seq=45 ttl=64 time=0.447 ms

--- 192.168.0.1 ping statistics ---
47 packets transmitted, 7 received, 85% packet loss, time 46044ms
rtt min/avg/max/mdev = 0.431/0.439/0.447/0.020 ms

calum@harvey ~ $ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:18:20:13
inet addr:192.168.0.107 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:177 errors:0 dropped:0 overruns:1 frame:0
TX packets:344 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:49675 (48.5 KiB) TX bytes:48865 (47.7 KiB)
Interrupt:5 Base address:0xd800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1320 (1.2 KiB) TX bytes:1320 (1.2 KiB)
and from windows:
C:\>ping 192.168.0.1

Pinging 192.168.0.1 with 32 bytes of data:

Reply from 192.168.0.1: bytes=32 time<10ms TTL=64
Reply from 192.168.0.1: bytes=32 time<10ms TTL=64
Reply from 192.168.0.1: bytes=32 time<10ms TTL=64
Reply from 192.168.0.1: bytes=32 time<10ms TTL=64

Ping statistics for 192.168.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>ifconfig
'ifconfig' is not recognized as an internal or external command,
operable program or batch file.

C:\>ipconfig

Windows 2000 IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.107
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
now i just *know* this is some simple config issue with how i have my network configured.

Yet again, and with the inevitable thanks in advance... any ideas?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jan 11, 2007 2:20 pm

Sounds like your default route is no set (usually set in a variable called GATEWAY). What does "netstat -rn" show?

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Jan 11, 2007 3:52 pm

what the jumping jehosephat himiny cricket!?!?!?!?!?!?!?!?!1oneone

now i rebooted to slack and hey presto i am now working fine in it. as far as i know i didn't change anything at all relating to the network (in fact i didn't change any configuration stuff that last time i logged in), but now "it just works". very odd.

anyway, for the sake of amusement, here's what the output is on a connected and working slackware!

Code: Select all

calum@harvey ~ $ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 eth0
calum@harvey ~ $ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.394 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.362 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.365 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.363 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.364 ms

--- 192.168.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.362/0.369/0.394/0.024 ms
thanks for your time, VM and sorry to have troubled you!

Post Reply