Showing posts with label CIFS. Show all posts
Showing posts with label CIFS. Show all posts

2014-03-13

Windows Routing / net use

route -f

route -p add 192.168.0.0 mask 255.255.0.0 192.168.1.1

route add 192.168.1.1 mask 255.255.255.255 192.168.2.1

route -p add 0.0.0.0 mask 0.0.0.0 192.168.2.1

net use p: \\192.1681.1\xxx /USER:xxx\xx.xxx

net use \\192.168.1.1 /USER:xxx

net use p: /delete

subst s: /d


Tiny Core Linux File System: NTFS, NFS, CIFS/Samba


ntfs-3g
ntfs-3g-adv
ntfsprogs

NFS:
nfs-utils:
sudo ln -s /usr/local/etc/init.d/nfs-client /sbin
sudo nfs-client start

NFSD:
        if [ ! -f /etc/hosts.allow ]; then
                sudo /bin/cp /mnt/tcz/nfs/hosts.allow /etc
        fi

        if [ ! -f /etc/hosts.deny ]; then
                sudo /bin/cp /mnt/tcz/nfs/hosts.deny /etc
        fi

        if [ ! -f /etc/exports ]; then
                sudo /bin/cp /mnt/tcz/nfs/exports /etc
        fi

        st2 filesystems-KERNEL
        st2 nfs-utils

        sudo /bin/cp /mnt/tcz/nfs/nfs-server /usr/local/etc/init.d
        sudo ln -s /usr/local/etc/init.d/nfs-server /sbin

        mkdir -p /opt/nfs
        sudo nfs-server start

CIFS (Windows Share Folder):
cifs-utils
sudo mount.cifs -o username=xxx,password=xxx,sec=ntlm //ip/path /path

Samba (Windows Share Folder Service):
        SAMBA_HOME=/usr/local/etc/samba

        sudo mkdir -p $SAMBA_HOME

        if [ ! -f $SAMBA_HOME/smbpasswd ]; then
                sudo /bin/cp /mnt/tcz/cifs/smbpasswd $SAMBA_HOME
        fi

        if [ ! -f $SAMBA_HOME/smbusers ]; then
                sudo /bin/cp /mnt/tcz/cifs/smbusers $SAMBA_HOME
        fi

        if [ ! -f $SAMBA_HOME/smb.conf ]; then
                sudo /bin/cp /mnt/tcz/cifs/smb.conf $SAMBA_HOME
        fi

        st2 samba3

        sudo smbpasswd -a tc

        sudo ln -s /usr/local/etc/init.d/samba /sbin

        mkdir -p /opt/cifs

        sudo samba start