PDA

View Full Version : NICs and daemons



gkp
07-10-2003, 07:52 AM
I'm experiencing two different problems:

One, I'm using two NICs, one embedded on my motherboard (via-rhine), and another on the PCI bus (3c59x). Both were found on the scan and both appear in 'lsmod' and 'lspci'. However, the Via seems to be turned off - at least it never responds to the cable modem when I do 'netcardconfig eth1 dhcp'...



Sending DHCP broadcast from device eth1Operation failed.
Failed.
Hit return to exit.



I would like to know if there are any utilities included with Knoppix to let me examine/adjust the configuration. I would also like to know which are the config files for the NICs so I can see how things are setup...

=====================

Two, when I did the HD installation, I specified that samba be started at system initialization. However, I have discovered that samba has opened up my machine to the rest of the internet and until I get the other NIC going and figure out how to setup the router (a topic for another day) I would now prefer to have it off by default and to manually start/stop it as needed.

I need to know how to un-setup samba's daemon. Other distros include a utility to control all the daemons, but I've spent a couple of days looking and can't find anything like that here. Am I not looking in the correct place? Do I need to edit some config file? Which one(s)?

Thanks,

GKP
(Paul Glanville)

Stephen
07-10-2003, 08:15 AM
I'm experiencing two different problems:

One, I'm using two NICs, one embedded on my motherboard (via-rhine), and another on the PCI bus (3c59x). Both were found on the scan and both appear in 'lsmod' and 'lspci'. However, the Via seems to be turned off - at least it never responds to the cable modem when I do 'netcardconfig eth1 dhcp'...



Sending DHCP broadcast from device eth1Operation failed.
Failed.
Hit return to exit.



I would like to know if there are any utilities included with Knoppix to let me examine/adjust the configuration. I would also like to know which are the config files for the NICs so I can see how things are setup...

=====================

You would be looking for ethtool which allows you to see or change the settings and is included in the install. The setup files are in /etc/network/interfaces for the cards, /etc/resolv.conf for the nameservers and /etc/hostname for your hostname. You may also want to try to use linux noapic at the LILO boot screen to see if that helps with the rhine card.


When you make changes in the network config files /etc/init.d/networking restart will re-start the networking with the new settings other option include start and stop.





Two, when I did the HD installation, I specified that samba be started at system initialization. However, I have discovered that samba has opened up my machine to the rest of the internet and until I get the other NIC going and figure out how to setup the router (a topic for another day) I would now prefer to have it off by default and to manually start/stop it as needed.

I need to know how to un-setup samba's daemon. Other distros include a utility to control all the daemons, but I've spent a couple of days looking and can't find anything like that here. Am I not looking in the correct place? Do I need to edit some config file? Which one(s)?

Thanks,

GKP
(Paul Glanville)
The startup daemons are usually in /etc/init.d so to stop samba /etc/init.d/samba stop as root in a console window will stop the daemon substitute start for stop to of course start and restart to restart the daemon after making changes in the config. The config file is most likely in the /etc directory itself just use ls /etc/sam and hit the TAB key for auto completion to see the file name. A samba link I just seen a post no more than ten minutes ago http://www.oreilly.com/catalog/samba/chapter/book/ch01_01.html.

gkp
07-10-2003, 05:35 PM
I'm experiencing two different problems:

One ... I would like to know if there are any utilities included with Knoppix to let me examine/adjust the configuration. I would also like to know which are the config files for the NICs so I can see how things are setup...

You would be looking for ethtool which allows you to see or change the settings and is included in the install. The setup files are in /etc/network/interfaces for the cards, /etc/resolv.conf for the nameservers and /etc/hostname for your hostname. You may also want to try to use linux noapic at the LILO boot screen to see if that helps with the rhine card.


Thanks, although ethtool doesn't seem to be quite as user-friendly as the network configuration utility I saw on a Red Hat system once (which I forgot the name of...).
/etc/network/interfaces doesn't even mention eth1, so I'm guessing that's the reason why I can't turn it ON and use it for a local net. I'll play with that a little later...
Interestingly, the plugin NIC is discovered in the scan before the one embedded on the motherboard. Ideally I'd like to hard-code the eth(x) values to particular NICs so that if I change my configuration slightly (perhaps add/change NICs and/or PCI slots) I don't have to deal with having the whole net go screwy because Linux found the cards in a different order...

I'm running grub, but I suspect the command you mention will work as well there; I'll play with it later as well...



Two ... I need to know how to un-setup samba's daemon. Other distros include a utility to control all the daemons, but I've spent a couple of days looking and can't find anything like that here. Am I not looking in the correct place? Do I need to edit some config file? Which one(s)?

The startup daemons are usually in /etc/init.d so to stop samba /etc/init.d/samba stop

This file appears to be a general purpose start/stop script. I would prefer not to have it run automagically in the first place. For instance, if my wife or one of my inlaws starts the machine they're not going to login as root and type in some cryptic command line command; they (like any regular users) just want to start up the browser and go surfing. Meanwhile the NetBIOS port is wide open and the system is quite possibly vulnerable to attack the while time. I need samba to be OFF by default and selectively enabled - not ON and manually disabled!

Red Hat includes a rather easy to use tool (again, I forgot the name) to start/stop/restart/enable/disable any/all of the daemons as well as certain system processes from one convenient place; it displays the state of all of the processes and you can check boxes to activate, start, stop, etc. particular ones. There's nothing like that here? Failing that, perhaps I can change the name of S20samba in each of the init.x directories, but I was really looking for a cleaner solution than that...

GKP
(Paul Glanville)

Stephen
07-10-2003, 06:13 PM
Ideally I'd like to hard-code the eth(x) values to particular NICs so that if I change my configuration slightly (perhaps add/change NICs and/or PCI slots) I don't have to deal with having the whole net go screwy because Linux found the cards in a different order...

You can edit the file /etc/modutils/aliases and put lines in there like:


alias eth0 3c59x
alias eth1 rhine

then run update-modules to update the modules.conf and this should work. note if the nic's that you change in use a different module then you would have to change accordingly also this done as root in a console window.


This file appears to be a general purpose start/stop script. I would prefer not to have it run automagically in the first place. For instance, if my wife or one of my inlaws starts the machine they're not going to login as root and type in some cryptic command line command; they (like any regular users) just want to start up the browser and go surfing. Meanwhile the NetBIOS port is wide open and the system is quite possibly vulnerable to attack the while time. I need samba to be OFF by default and selectively enabled - not ON and manually disabled!


You should be running a firewall anyway to remove the worry of samba or anything else running. There are several available through apt-get such as firestarter, guarddog and bastille-linux or you could use what I do on my router Arno's Iptables-firewall (http://rocky.molphys.leidenuniv.nl/) it's an easy setup with clear instructions on use although no graphic interface.


Also the GRC (http://www.grc.com) website has a handy tool for scanning your ports called ShieldsUp just follow the links to you get to probe your ports to see what is open to the world.




Red Hat includes a rather easy to use tool (again, I forgot the name) to start/stop/restart/enable/disable any/all of the daemons as well as certain system processes from one convenient place; it displays the state of all of the processes and you can check boxes to activate, start, stop, etc. particular ones. There's nothing like that here? Failing that, perhaps I can change the name of S20samba in each of the init.x directories, but I was really looking for a cleaner solution than that...

GKP
(Paul Glanville)

I don't really do the graphic management of the services so I really have no experience with the tools available a google for linux (http://www.google.com/linux) search with some well chosen keywords should find something usefull, perhaps other people reading the forum may have more to offer in this respect.

Edwin
07-10-2003, 06:20 PM
Red Hat includes a rather easy to use tool (again, I forgot the name) to start/stop/restart/enable/disable any/all of the daemons as well as certain system processes from one convenient place

I just discovered SysV-Init (in the System-theme in the K-menu) Could that be what you are looking for?

- - Edwin

gkp
07-10-2003, 07:09 PM
I just discovered SysV-Init (in the System-theme in the K-menu) Could that be what you are looking for?

YES! Thanks!

This utility seems to simply create/delete files in the relevant rc(x).d directories, allowing/preventing the selected services to execute at startup, as well as starting/stoping/restarting individual services - all of which serves my purposes exactly.

Thanks again.

GKP