Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have folder "rep_backup" and i want to share it to linx server. How can I do it ? Step by step I install "SAMBA" to my linux server

share|improve this question
    
possible duplicate of How i can install samba to unix server ? –  Dennis Williamson Oct 31 '10 at 13:41
add comment

2 Answers

up vote 3 down vote accepted

Exactly how to install samba will depend on which arrangement of Linux and related tools you are running, so you need to add that information to you question.

You are not actually looking to install the samba services on Linux if I am reading your question correctly (you want to access Windows shares from Linux and not currently access shares on Linux from Windows) - in which case what you want is support for the current filesystem driver. On Debian or Ubuntu and setups based upon them this can be installed with aptitude install smbfs. You don;t need the full samba service installed to access Windows shares - you only need that if you want the Linux server to publish shares itself.

Once the current filesystem support is enabled you can mount shares using a command-line like mount -tcifs //<machine-name-or-address>/<share-name> <mount-point -ousername=<window-user-name>. For example on my network sudo mount -tcifs //dave/media /mnt/media/ -ousername=dspillett has my netbook (running Ubuntu) mount a share on my main desktop box (runninx XP) as /mnt/media. The filesystem type cifs is a newer version of smbfs, for accessing really old Windows setups you might need to replace -tcifs with -tsmbfs. When done you can disconnect the share with umount <mount-point>.

The commands above will prompt for the Windows password. If you need to script mounting network shares then you need to provide that too. This can be done with -ousername=<window-user-name>,password=<windows-password> but this has security issues in a multi-user environment. Using -ocredentials=<credentials-file> is more secure but make sure that you ensure the credentials file can only be accessed by the right user(s) (i.e. root, or members of the admin group, and so on). This also allows you to setup the mount-points in /etc/fstab so the shares are connected to after each reboot and/or can be connected to using the shorthand mount <mount-point>. See the relevant man-page for more detail and extra options available.

share|improve this answer
add comment

Have a look at this link.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.