PDA

View Full Version : nic needs to be forced!!



FelixDzerzhinsky
08-04-2003, 08:06 PM
I can't get on the internet without being su.

Have to type in : mii-tool -F 10baseT-HD eth0 (as su) to force my nic to work!

Then again as su I have to pon.

(It is configured with pppoeconfig)

Once the nic is forced it goes great.

I am using a COM 21 Cable Modem with with www.wanadoo.nl as my provider. I connect with an ethernet card.

What I would love to happen is for:

1. All my users to be able to pon (without being su)

2. I would like to set it up so I (or my users) don't have to type manually "mii-tool -F 10baseT-HD eth0" (as su) to force my nic to work every time!!!

I've been trying to work this out for months :evil: I am going nuts :evil:

Thanks :D

Stephen
08-04-2003, 08:52 PM
2. I would like to set it up so I (or my users) don't have to type manually "mii-tool -F 10baseT-HD eth0" (as su) to force my nic to work every time!!!


Thanks :D

Have you tried putting the line in /etc/init.d/bootmisc.sh so the command is run every time you boot.

FelixDzerzhinsky
08-05-2003, 08:37 PM
This is what my file looks like. Where do I put the "mii-tool -F 10baseT-HD eth0 " ???


# bootmisc.sh Miscellaneous things to be done during bootup.
#
# Version: @(#)bootmisc.sh 2.78 13-Nov-1999 miquels@cistron.nl
#

. /etc/default/rcS
#
# Put a nologin file in /etc to prevent people from logging in before
# system startup is complete.
#
if [ "$DELAYLOGIN" = yes ]
then
echo "System bootup in progress - please wait" > /etc/nologin
cp /etc/nologin /etc/nologin.boot
fi

#
# Wipe /tmp (and don't erase `lost+found', `quota.user' or `quota.group')!
# Note that files _in_ lost+found _are_ deleted.
#
[ "$VERBOSE" != no ] && echo -n "Cleaning: /tmp "
#
# If $TMPTIME is set to 0, we do not use any ctime expression
# at all, so we can also delete files with timestamps
# in the future!
#
if [ "$TMPTIME" = 0 ]
then
TEXPR=""
else
TEXPR="! -ctime -$TMPTIME"
fi
( cd /tmp && \
find . -xdev \
$TEXPR \
! -name . \
! \( -name lost+found -uid 0 \) \
! \( -name quota.user -uid 0 \) \
! \( -name quota.group -uid 0 \) \
-depth -exec rm -rf -- {} \; )
rm -f /tmp/.X*-lock
#
# Clean up any stale locks.
#
[ "$VERBOSE" != no ] && echo -n "/var/lock "
( cd /var/lock && find . -type f ! -newer /etc/mtab -exec rm -f -- {} \; )
#
# Clean up /var/run and create /var/run/utmp so that we can login.
#
[ "$VERBOSE" != no ] && echo -n "/var/run"
( cd /var/run && \
find . ! -type d ! -name utmp ! -name innd.pid ! -name random-seed \
! -newer /etc/mtab -exec rm -f -- {} \; )
: > /var/run/utmp
if grep -q ^utmp: /etc/group
then
chmod 664 /var/run/utmp
chgrp utmp /var/run/utmp
fi
[ "$VERBOSE" != no ] && echo "."

#
# Set pseudo-terminal access permissions.
#
if [ -c /dev/ttyp0 ]
then
chmod 666 /dev/tty[p-za-e][0-9a-f]
chown root:tty /dev/tty[p-za-e][0-9a-f]
fi

#
# Update /etc/motd.
#
if [ "$EDITMOTD" != no ]
then
uname -a > /etc/motd.tmp
sed 1d /etc/motd >> /etc/motd.tmp
mv /etc/motd.tmp /etc/motd
fi

#
# Save kernel messages in /var/log/dmesg
#
dmesg > /var/log/dmesg

# remove comment(s) to enable DMA
#/sbin/hdparm -qd1 /dev/hda :?: :?: :?:

Stephen
08-05-2003, 09:29 PM
AT the bottom of the file right after the disabled DMA line. note: you may want to enable the DMA by uncommenting the line for it.

FelixDzerzhinsky
08-06-2003, 05:14 PM
Thanks Stephen. It worked!!!

I still have the permission problem. What do I need to do so my users have pppoe access. At the moment they have to be su.

Thanks :P

Stephen
08-06-2003, 06:13 PM
Thanks Stephen. It worked!!!

I still have the permission problem. What do I need to do so my users have pppoe access. At the moment they have to be su.

Thanks :P

Have you added them to the dailout group? If not use the command as root adduser user_name dailout and see if that helps.

FelixDzerzhinsky
08-06-2003, 09:18 PM
Tried adding users to group dialout (as su). No luck got this message:

please configure /etc/peers/ppp/provider or use a command line argument to use another file in /etc/ppp/peers directory.

????

FelixDzerzhinsky
08-06-2003, 09:39 PM
# Configuration file for PPP, using PPP over Ethernet
# to connect to a DSL provider.
#
# See the manual page pppd(8) for information on all the options.

##
# Section 1
#
# Stuff to configure...

# MUST CHANGE: Uncomment the following line, replacing the user@provider.net
# by the DSL user name given to your by your DSL provider.
# (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
#user myusername@myprovider.net

# Use the pppoe program to send the ppp packets over the Ethernet link
# This line should work fine if this computer is the only one accessing
# the Internet through this DSL connection. This is the right line to use
# for most people.
pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1452"

# If the computer connected to the Internet using pppoe is not being used
# by other computers as a gateway to the Internet, you can try the following
# line instead, for a small gain in speed:
#pty "/usr/sbin/pppoe -I eth0 -T 80"

# An even more conservative version of the previous line, if things
# don't work using -m 1452...
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1412"


# The following two options should work fine for most DSL users.

# Assumes that your IP address is allocated dynamically
# by your DSL provider...
noipdefault
# Comment out if you already have the correct default route installed
defaultroute

##
# Section 2
#
# Uncomment if your DSL provider charges by minute connected
# and you want to use demand-dialing.
#
# Disconnect after 300 seconds (5 minutes) of idle time.

#demand
#idle 300

##
# Section 3
#
# You shouldn't need to change these options...

hide-password
lcp-echo-interval 60
lcp-echo-failure 3
# Override any connect script that may have been set in /etc/ppp/options.
connect /bin/true
noauth
persist
mtu 1492
user "c7353047@wanadoo"
usepeerdns

Stephen
08-06-2003, 11:10 PM
I've never used ppp before but from what the file is saying here you should uncomment this line and put your user name in.



# Configuration file for PPP, using PPP over Ethernet
# to connect to a DSL provider.
#
# See the manual page pppd(8) for information on all the options.

##
# Section 1
#
# Stuff to configure...

# MUST CHANGE: Uncomment the following line, replacing the user@provider.net
# by the DSL user name given to your by your DSL provider.
# (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
#user myusername@myprovider.net


I think should be changed to user c7353047@wanadoo if this is your correct username but that's pretty much the only idea I have looking at the file except you should check in the file /etc/ppp/pap-secrets as it tells you for the correct line there also.

FelixDzerzhinsky
08-07-2003, 06:51 PM
knoppix@hal9000:~$ pon
SIOCSIFFLAGS: Permission denied
/usr/sbin/pppd: Can't open options file /etc/ppp/peers/dsl-provider: Permission denied


That is what happens when I pon as a normal user.

My users are already in dialout.

What should I do?

FelixDzerzhinsky
08-07-2003, 08:47 PM
knoppix@hal9000:~$ ls -la /etc/ppp/peers/dsl-provider
-rw-r----- 1 root dip 1810 Aug 7 20:47 /etc/ppp/peers/dsl-provider
knoppix@hal9000:~$ ls -ld /etc/ppp/peers/dsl-provider
-rw-r----- 1 root dip 1810 Aug 7 20:47 /etc/ppp/peers/dsl-provider

There seems to be a permission problem!

Stephen
08-07-2003, 09:51 PM
knoppix@hal9000:~$ ls -la /etc/ppp/peers/dsl-provider
-rw-r----- 1 root dip 1810 Aug 7 20:47 /etc/ppp/peers/dsl-provider
knoppix@hal9000:~$ ls -ld /etc/ppp/peers/dsl-provider
-rw-r----- 1 root dip 1810 Aug 7 20:47 /etc/ppp/peers/dsl-provider

There seems to be a permission problem!

Have you checked to make sure that you are a member of the dip group, that is the group ownership on the dsl-provider file not the dialout group. If that fails you may want to try chmod 644 /etc/ppp/peers/dsl-provider to make the file r/w for user root and read only for the group and others.

FelixDzerzhinsky
08-08-2003, 04:31 PM
knoppix@hal9000:~$ pon
SIOCSIFFLAGS: Permission denied
knoppix@hal9000:~$ ls -ld /etc/ppp/peers/dsl-provider
-rw-r--r-- 1 root dip 1810 Aug 7 20:47 /etc/ppp/peers/dsl-provider
knoppix@hal9000:~$ adduser knoppix dip
adduser: Only root may add a user or group to the system.
knoppix@hal9000:~$ su
Password:
root@hal9000:/home/knoppix# adduser knoppix dip
The user `knoppix' is already a member of dip.
root@hal9000:/home/knoppix# pon


No Luck! This is the story so far!

FelixDzerzhinsky
08-10-2003, 07:21 PM
As a temp measure I have made all my users( my girlfreind and I) sudo.

Now it connects on boot.

Thanks to all, especially Stephen from Nova Scotia and greycat on #debianhelp