Samba

This page will serve as an entry point to all things Samba within CSCF.

Introduction

Samba implements the CIFS (common internet file system) protocol, or more modern terminology seems to refer to this as Server Message Block (SMB2, version 2 was released with Vista in 2006).

Accessing the CS Core SAMBA File Server from UBUNTU

If the smbfs package is not installed, install it via apt-get, that is, run sudo apt-get install smbfs (if you are root already, you can omit sudo).

Next make a mount point directory that can be used to access the CS core samba share. A suggested name is to call it cs_core_account, say in your home directory of the account you will be running the smbmount command as documented below. So run mkdir ~/cs_core_account (smbmount wouuld exit telling you if this does not exist).

To mount your CS Core file space you the following command

  • smbmount //smb-files.cs.uwaterloo.ca/userid  ~/cs_core_account -o username=userid where userid would be replaced with the userid you would login to with to the CS core environment You will be prompted with your CS core password (it should agree with your CS-GENERAL Windows domain password) You can now make changes to your files on the cs core environment by changing directory into ~/cs_core_account.

  • You have to be root (even though umount is siud root) you unmount the samba share you just created! I.e., simply run sudo umount ~/cs_core_account.

To access your undergraduate or student account, simply replace smb-files.cs with smb-files.student.cs above and CS-GENERAL would be replaced with TEACHING.

File Locking

I tried a test by mounting a remote directory twice under differently named local directories and then tried editing a common file and locking was confirmed, i.e., I wasn't allowed to edit the file after opening it up the second time.

CIFS kernel module

Linux mount command has the ability to mount CIFS filesystems via the -t cifs option (it invokes the command mount.cifs which can be invoked directly). In the reference below, it is claimed that Kerberos will be supported in version 1.48. Running modinfo cifs on Hardy/i386 box we get
        filename:       /lib/modules/2.6.24-17-generic/kernel/fs/cifs/cifs.ko
        version:        1.52
        description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
        license:        GPL
        author:         Steve French <sfrench@us.ibm.com>
        srcversion:     6BE8BB9F68C542F4B1774D3
        depends:        
        vermagic:       2.6.24-17-generic SMP mod_unload 586 
        parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (int)
        parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (int)
        parm:           cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (int)
        parm:           cifs_max_pending:Simultaneous requests to server. Default: 50 Range: 2 to 256 (int)
Direct confirmation of Kerberos needs to be done.


Various examples of querying CIFS services

Listing Printers in CS-GENERAL domain

smbclient -L smb-printers.cs.uwaterloo.ca -W CS-GENERAL | grep Printer: you will be prompted with you core password.

Listing general services

smbclient -N -L server-name

External References

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2020-08-28 - ClaytonTucker
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback