Sunday, August 16, 2009

How to install Samba Server on Debian

NFS could be the best solution for file transfering and disk mounting between Unix and Windows systems. However it has special protocol and because of that it needs extra program installation in Windows side.

Samba does not require any special attention, it uses very common protocol which called Netbios (this is the main difference between Samba and NFS, NFS uses it own protocol) which used by Windows systems for file and print sharing (it support dozens of protocols but it is out of our scope right now)

Samba installation and commissioning is easy like NFS and other programs on Debian based system (that's why i like Debian distro so much)

Just follow step for a basic Samba server installation,

1) apt-get install samba smbfs

Ok it's done, installed, now we need to creat a samba password (you can also create a special username for samba, but no harm if you use your exisiting users)

2) smbpassword

Set you samba password as you desired, then we should make some changes in config file for accessing correct path and security.

3) vi /etc/samba/smb.conf

First you can limit access to your Samba server with "hosts allow = 192.168.1.3 ". It means only 192.168.1.3 can access Samaba server. You should put this line under "Networking" section.

And add your home directory as,
[sharename] comment = Insert a comment here path = /home/share/ valid users = tfox carole public = no writable = yes printable = no create mask = 0765
Finally you need to restart samba service for commiting setting above.

"/etc/init.d/samba restart"

If everything is ok you can access to your /home/share in Linux machine from you Windows machine using Start-Run-

"\\192.168.1.100"

It will ask you about authentication info, write your username and password (samba password) to login and access directories that you allowed to browse.

That's all, I hope it will work for you too.

Cheers

Typhoon Master

Friday, August 14, 2009

How to install a NFS server on Debian

How to install a NFS server on Debian

NFS (Network File System) is must if you'd like to share your storage capacity through IP network. It's easy to build easy to configure. Just follow the steps below.

1) Run apt-get install nfs-kernel-server nfs-common portmap

2) Then edit /etc/exports as following

# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
/media/sdb 192.168.1.10(rw,sync,no_root_squash)

Line in red indicates your NFS server's share point directory, access granted IP and permissions. wq exports file.

3) You need to commit your changes with following command

exportfs -a

That's all you can mount your NFS client to your new NFS server.

Cheers

Typhoon Master