Hello,
I have a Windows 8 PC that as several usb ports. I run on it Windows, and I have no admin rights at all. I have a vaio mini that runs debian linux (I have all rights).
The aim would be to let the window machine see the files over the usb cable which would be plugged to the vaio mini.
I would like that the vaio mini runs a samba and offer this samba network to the windows 8 machine.
I know it is possible since my zaurus could also give a samba for file access over usb without having the need of admin password for the windows.
any ideas?
sincerely yours.
what about
:
method 1:
please keep in mind that I have no rights to install anything or configure an additional networking usb device ip stuffs, since just user rights on the windows machine:
Code:
> /etc/hotplug/usb: > > #!
/bin/bash > # /etc/hotplug/usb/usbdnet > # > typeset -i num > num=`ifconfig
| grep usb0 | wc -l` > if [ $num -eq 0 ] ; then > ifconfig usb0
192.168.129.1 netmask 255.255.255.255 up > route add -host 192.168.129.201
usb0 > fi > iptables -t nat -F > iptables -t nat -A POSTROUTING -j SNAT -o
eth0 --to 192.168.0.XXX > echo 1 > /proc/sys/net/ipv4/ip_forward > > (where
192.168.0.XXX is local ethernet IP address on my desktop machine) > > The
basic sync functionality, including local VNC, ssh, etc, > connections,
only sets up basic host routing between the Z and your >
just connect the USB cable (USB mini-B into Zaurus, USB A into Laptop or
PC). The Windows machine should detect a new device at this point, a SL
series Ver3 (NDIS 5) network adaptor, and you should be able to configure
it. By default, the Zaurus would be assigned an IP address of
192.168.129.201. Assign an IP address in the same range to this new
network adaptor, eg 192.168.129.101. You should now be able to ping both
ways unless you have a firewall blocking it or DDE service is not enabled.
If you want the Zaurus to be able to access the internet as well, you
could enable internet sharing on your Windows PC (assuming it has internet
connectivity and you trust Microsoft security). If you do that, Windows
will reset the IP address of your Zaurus NDIS driver to 192.168.0.1 but
you can change it back to whatever value you had given it before, ie
192.168.129.101 On the Zaurus side, you need to run the following commands
to setup a route to your windows box:
+-------------------------------------------------------------------------------+
| # su | | # route add -host 192.168.129.101 usbd0 | | # route delete -net
192.168.129.0/24 usbd0 | | # route add default gw 192.168.129.101 |
method 2:
another way would be to create an image img file and to share it via usb over g_file_storage, but well this is onto a image img file.
Creating an image is very simple and works well over the g_file_storage. However I would like to really sharing files without the need of image file, simply whole real files located on the vaio linux partition.
Code:
I would like that the file sharing of my vaio is really from the /home or whatever files that are located onto the harddisk /dev/sda2, without having to trick or work-around with an image.
example of idea over image file, but me, I would like to write directly on the partition having linux without the image need.
g_filemounter( 1 , " lsmod | grep g_file_storage ", " cd ~/documents/cdroms ; sudo modprobe g_file_storage removable=1 stall=0 file=disk-gadget.img " , " sudo rmmod g_file_storage " );
the method 3 consists to use the g_mass_storage
it is a nice way since the sda3 could be ntfs and be read/write from the windows. HOWEVER!!!, it cannot be worked on it at the same time by hte windows and the vaio machines.
One machine can mount it at a time to avoid data corruption.
So this is why I came to the idea of creating a sort of samba that could be really accepted by all whatever windows 7,8 or xp that does not ask you to install any driver or install any other whatever. but I do not know how actually...
modprobe g_mass_storage file=/dev/sda3