Tuesday, June 12, 2012

samba server




SAMBA SERVER

samba server is used for file sharing and transfering between different platforms like as ubuntu to windows with authentication

port no:137 138 139
package: samba
service: smb
demon: smbd

now open the configuration file

#apt-get install samba

vim /etc/samba/smb.conf

[photos]
path=/home/sunny/photos
valid user=sunny
browseable=yes
writeable=yes
create mask= 0770
directory mask=0770

then save and quit

after that
create a samba user
#useradd -m -s /bin/bash sunny

Then create a samba password for the user like this
#smbpasswd -a sunny
****
****
Then after this restart the service
#/etc/init.d/samba restart

then after this try this in other system
#smbclient //192.168.1.15/photos -U sunny

or like this also

#mount.cifs 192.168.1.15:photos /mnt -o username=sunny

IN WINDOWS:
Right click the my computer ther you can see option like select network drive
here take any drive from (a-z) then in next block give the ip address of the samba server then browse
after this you can see the ip address of the network
then select the ip
after this you can see the share name like a folder with the name photos
then select it
it will prompt for the samba user passwd before you have seen
then give the password now you can see the shared folder in windows




No comments:

Post a Comment