Internetaccess via Huawei E220 UMTS/GPRS Modem 
Kernel < 2.6.20 needs a udev rule:

http://www.kanoistika.sk/bobovsky/archi ... eiAktBbo.c

/etc/udev/rules.d/82-huawei220.rules

ACTION=="add", SUBSYSTEM=="usb_device", \
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1003", \
RUN+="/usr/sbin/huaweiAktBbo"

/etc/ppp/peers/huawei
ttyUSB0
460800
idle 7200
lock
crtscts
modem
noauth
#usepeerdns (sometimes i got no dns -> edit /etc/resolv.conf)
replacedefaultroute
defaultroute
noipdefault
noccp
nobsdcomp
novj
user "web"
password "web"
connect /etc/ppp/peers/huawei-chat
disconnect /etc/ppp/peers/disconnect-chat
ipcp-restart 8
ipcp-max-configure 30
ipcp-accept-local
ipcp-accept-remote
noipv6
noipx
mtu 1420
connect-delay 10000
noproxyarp
novjccomp
updetach
debug

/etc/ppp/peers/huawei-chat
exec chat                                   \
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rATZ \
TIMEOUT 3 \
SAY "Press CTRL-C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK "AT+CPIN?" \
READY-AT+CPIN="XXXX"- \c \
OK AT+CPIN? \
READY \c \
OK "ATE1V1&D2&C1S0=0+IFC=2,2" \
OK AT+CGDCONT=1,\"IP\",\"fullspeed\" \
OK ATD*99***1# \
TIMEOUT 22 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"

/etc/ppp/peers/disconnect-chat
exec /usr/sbin/chat -V -s -S    \
ABORT "BUSY" \
ABORT "ERROR" \
ABORT "NO DIALTONE" \
SAY "\nSending break to the modem\n" \
"" "\K" \
"" "\K" \
"" "\K" \
"" "\d\d+++\d\dATH" \
SAY "\nPDP context detached\n"

/etc/network/interfaces
allow-hotplug huawei
iface huawei inet ppp
provider huawei

http://wwwu.uni-klu.ac.at/agebhard/HuaweiE220/
http://linux.frankenberger.at/Huawei_E220.html
http://oozie.fm.interia.pl/pro/huawei-e220/

Often DNS is not set during PPP connection. A workaround is

/etc/ppp/options:
ipcp-max-failure 30


[ view entry ] ( 906 views )   |  print article
udev - usb add / remove 
Because udev didn't know anything of idVendor or idProduct if you remove a device i use ENV{PRODUCT} to match for my unplugged device:


ACTION=="add", KERNEL=="event*", SUBSYSTEM=="input", \
SYSFS{idVendor}=="1234", SYSFS{idProduct}=="5678", \
SYMLINK+="input/myevent"

ACTION=="remove", SUBSYSTEM=="usb", \
ENV{PRODUCT}=="1234/5678/100", \
RUN+="/usr/bin/killall myprog"


[ view entry ] ( 857 views )   |  print article
Permissions 

File Permissions


Action --- r-- -w- --x rw- r-x -wx rwx r-s
read - cat file no yes no no yes yes no yes
write - ls /tmp >> file no no yes no yes no yes yes
write - ls /tmp > file no no yes no yes no yes yes
remove file yes* yes* yes yes* yes yes* yes yes
executing a script no no no no no yes no yes yes**

yes*: These files gave a "rm: remove write-protected file 'filename'?" error. Saying "yes" removes these files. Also performing a "rm -rf" file removes the file without any warning. The ability to remove a file is controlled at the directory level.
yes**: execute a file with permission of owner or group

Directory Permissions


Action --- r-- -w- --x rw- r-x -wx rwx
cd into directory no no no yes no yes yes yes
ls directory no yes* no no yes* yes no yes
file name completion no yes no no yes yes no yes
create new file in dir. no no no no no no yes yes
read file in dir. no no no yes no yes yes yes
modify file in dir. no no no yes no yes yes yes
remove files no no no no no no yes yes
execute script no no no yes no yes yes yes

ls = yes* - Only the files are listed with error. No other file attributes are able to be listed. File name completion works in these cases as well.

t - Save text attribute (sticky bit): The user may delete or modify only those files in the directory that they own or have write permission for (/tmp).

s - Set group ID: files in that directory will have the group ownership as the directory, instead of than the group of the user that created the file


If you want to have full access to a directory with 2 different users in different groups make a new group and add both users.

addgroup newgroup
adduser user1 newgroup
adduser user2 newgroup

chown root:newgroup /directory
chmod 775 /directory

You do not need to use group ID (s-Flag).


You can use these commands to set 755 on directories and 644 on files

find -type f -exec chmod 644 {} \;
find -type d -exec chmod 755 {} \;


[ view entry ] ( 1059 views )   |  print article
Monitoring filesystem activity under Linux with block_dump 
sudo sysctl vm.block_dump=1

or

echo 1 > /proc/sys/vm/block_dump


tail -f /var/log/kern.log

[ view entry ] ( 2925 views )   |  print article
ntfs read/write with feisty 
apt-get install ntfs-g3

/etc/group
+fuse:x:100:users

vol_id /dev/sda1

/etc/fstab
UUID=5EFC7B02FC7AD42D   /media/usbhdd ntfs-3g rw,users,uid=1000,guid=1000,umask=007,locale=de_AT.utf8,force   0    0
user can mount but not unmount
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/71609/comments/7

wget http://launchpadlibrarian.net/7435949/u ... ount.patch

$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get build-dep mount
$ cd /tmp
$ apt-get source mount
$ cd util-linux-2.12r
$ ./debian/rules patch
$ patch -Np1 -i ../util-linux_user_mount.patch
$ ./configure
$ make lib
$ make -C mount
$ sudo chown root:root mount/umount
$ sudo chmod 4755 mount/umount
$ sudo mv mount/umount /bin

automount with udev:

06-usbsticks.rules
BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="DEF10000CC2DAB6", NAME="%k", run+="/bin/mount /media/usbhdd"


[ view entry ] ( 1352 views )   |  print article

<<First <Back | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Next> Last>>