You are here Home > Know-how > Linux > Server > Samba (File Server)

Linux Reference

4.3 Samba (File Server)


20.02.2008
4.2 FTP [  up  ] - [ top ] - [ linux a-z ] 4.4 NFS Server

Mount a Samba share on a Linux box

Usage

smbmount //host/share_name /home/foo/samba -o "username=remote_user,uid=500,gid=500"

Sample mount script

$ cat mount.sh
#!/bin/bash

echo "1 x root"
echo "1 x webcms"

# uid/gid = local account IDs of *this* host
su -c "smbmount //your_samba_host/share_name /home/foo/samba -o \"username=remote_user,uid=500,gid=500\""

Automount via /etc/fstab

//hostname/share   /home/foo/samba   smb   username=remoteuser,password=bar,uid=500,gid=500  0 0


See also: /know how/samba



copyright by retoh - created with mytexi