Google


ADBRITE ads links
You are here: CodeIdol.com > Unix > Linux® Quick Fix > Sharing Resources Using Samba > Automating Mounting With Linux Samba Clients

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

Automating Mounting with Linux Samba Clients

You can also automate the mounting of shares by placing entries in your /etc/fstab file. In the example below the home directory of user peter on server 192.168.1.100 will be mounted on the /mnt/smb mount point as a Samba filesystem (smbfs) using the login information in the file named /etc/cred.

     #
     # File: /etc/fstab
     #
     //192.168.1.100/peter    /mnt/smb    smbfs    credentials=/etc/cred 0 0

The contents of the /etc/cred file needs to have the username and password for the account in this format

     #
     # File: /etc/cred
     #
     username = peter
     password = peterspassword

Once finished, you can use mount -a to mount the new /etc/fstab entry, and the /mnt/smb directory will contain the contents of the share.

     [root@smallfry tmp]# mount -a
     [root@smallfry tmp]# ls /mnt/smb
     backups profile   docs data music
     [root@smallfry tmp]#

    SAVE
    Digg
    Shown on del.icio.us del.icio.us
    See Whos Talking About This on Technorati Technorati
    I've Reddit reddit

    You are here: CodeIdol.com > Unix > Linux® Quick Fix > Sharing Resources Using Samba > Automating Mounting With Linux Samba Clients
       
    Related tags







    Popular Categories
    Unix books and guides
    AJAX popular information
    C# language guides
    Windows books and cookbooks
    .......






    © CodeIdol Labs, 2007