![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Networking & Wireless Having problems getting connected to the internet or getting your wireless card to work? Ask here. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Chocolate Ubuntu Mocha Blend
![]() |
HOWTO: Mounting SMB/CIFS Shares
Update: November 18, 2007
A few of the downsides on the Nexstar LX NAS device that I purchased is that: 1. It does not support CIFS 2. It does not support SATA drives (IDE only) 3. It is 10/100 Mbps (no gigabit) 4. It does not have any fault tolerance. It is, however, an inexpensive device that can be used to share data among many computers. Anyhow, I have been in the process of upgrading my home network to gigabit and wanted to purchase a better NAS device that had some redundancy & expandability, as well as support for gigabit, CIFS and SATA drives (hot-swappable, no less). I ended up purchasing a Netgear (formerly Infrant) ReadyNAS NV+ 4250 and am providing an update to my original instructions using CIFS rather than smbfs: Steps 1 and 2 remain the same. In step 3, test mount the share using CIFS as noted: Code:
dbott@gutsy:~$ sudo mount -t cifs //192.168.1.2/Music /home/dbott/Music -o iocharset=utf8,file_mode=0777,dir_mode=0777 Step 5, add the mount point(s) to your /etc/fstab file: Code:
//192.168.1.2/Music /home/dbott/Music cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 //192.168.1.2/dbott /home/dbott/Data cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 //192.168.1.2/Archive /home/dbott/Archive cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0 Code:
sudo usermod --uid 1004 dbott Original Post: October 2006 I purchased a NexStar LX NAS device and wanted to mount some of the shares on my linux computers. I configured my NAS device with a static IP (192.168.1.2) and created a number of shares to store my data. This process can be used to mount any SMB or Windows shared folder: 1. Install 'smbfs' & 'smbclient' (Samba File System & Samba client) Code:
sudo apt-get install smbfs smbclient Code:
dbott@thedrake:~$ smbclient -L 192.168.1.2 -U%
Sharename Type Comment
--------- ---- -------
PUBLIC Disk
Data Disk
Archive Disk
Music Disk
IPC$ IPC
Server Comment
--------- -------
Workgroup Master
--------- -------
Code:
cd ~ mkdir music Code:
sudo smbmount //192.168.1.2/Music /home/dbott/music -o username=dbott,password=mysecretpassword,uid=1000,mask=000 Code:
sudo smbumount /home/dbott/music The unsafe way (fstab is world-readable, meaning that anyone can see your SMB username and password): Code:
//192.168.1.2/Music /home/dbott/music smbfs auto,username=dbott,password=mysecretpassword,uid=1000,umask=000,user 0 0 Code:
//192.168.1.2/Music /home/dbott/music smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 Code:
sudo gedit /root/.credentials Code:
username=your_smb_username password=your_smb_password Code:
sudo chmod 600 /root/.credentials Code:
sudo shutdown -r now Code:
sudo mount -a -Dave
__________________
HOWTO: Reverse VNC | HOWTO: Connect to another user's terminal | HOWTO: Mount SMB Shares | HOWTO: Create PDF Documents | HOWTO: Install DenyHosts Last edited by dbott67; November 18th, 2007 at 04:49 PM.. Reason: Added CIFS instructions |
|
|
|
|
|
#2 |
|
First Cup of Ubuntu
![]() Join Date: Oct 2006
Location: Guildford, UK
My beans are hidden!
Kubuntu 6.06 Dapper
|
Re: HOWTO: Mounting SMB Shares
Thank you, this was really useful to me.
|
|
|
|
|
|
#3 |
|
Chocolate Ubuntu Mocha Blend
![]() |
Re: HOWTO: Mounting SMB Shares
BROWSING SHARES FROM A GUI
Depending on which version of Ubuntu you use (Gnome, KDE, XFCE, etc.), you may not be able to graphically connect to a Samba share. If you just want to connect to one from a command line, you'll need 'smbfs' (SMB file System) and 'smbclient' (SMB client). Nautilus does allow browsing but there appears to be some known bugs when browsing via 'workgroup' or by 'computer name'. Apparently, browsing by IP address work okay. You can try installing 'linneighborhood' or pyNeighborhood to see if works better than Nautilus for browsing via GUI. Code:
sudo apt-get intsall smbfs smbclient linneighborhood Code:
smbclient -L 192.168.1.2 -U% Code:
dbott@thedrake:~$ smbclient -L 192.168.1.2 -U%
Sharename Type Comment
--------- ---- -------
PUBLIC Disk
Data Disk
Archive Disk
Music Disk
IPC$ IPC
Server Comment
--------- -------
Workgroup Master
--------- -------
-Dave
__________________
HOWTO: Reverse VNC | HOWTO: Connect to another user's terminal | HOWTO: Mount SMB Shares | HOWTO: Create PDF Documents | HOWTO: Install DenyHosts Last edited by dbott67; November 17th, 2006 at 11:05 AM.. |
|
|
|
|
|
#4 |
|
Chocolate Ubuntu Mocha Blend
![]() |
Re: HOWTO: Mounting SMB Shares
Also, some issues arise because of the way SMB shares "announce" themselves to the network. Generally, connecting via IP address works properly, but browsing by 'computer name' can occasionally fail. Windows uses WINS service to allow users to browse by computer name (also known in Windows-speak as Netbios name). WINS binds the computer name to the IP address. For the most part, this has been superceded by DNS, which binds the fully-qualified domain name to the IP address. The problem is that DNS resolution requires that:
a) You're running a DNS server b) Each client is registered in the DNS server The problem here is that most people don't run their own DNS server and if you have any Windows computers on the network (or Samba shares), you really should have a WINS server or 'winbind' installed. There is a package in the repositories called 'winbind' that will allow you to browse by computer name. This info is provided by 'featherking' from this thread: Code:
sudo gedit /etc/nsswitch.conf Code:
hosts: files dns mdns Code:
hosts: files dns mdns wins Code:
sudo apt-get install winbind -Dave |
|
|
|
|
|
#5 |
|
Gee! These Aren't Roasted!
![]() Join Date: Jun 2006
Location: Kassel, Germany
My beans are hidden!
Ubuntu 8.10 Intrepid Ibex
|
Re: HOWTO: Mounting SMB Shares
A nice guide!!! Thank you.
...but what if the Server holding the shares is Window and is domain member. I tried with a local account on the Windows machine, but no chance. sudo smbmount //192.168.1.2/Music /home/dbott/music -o username=dbott,password=mysecretpassword,uid=1000,mask=000 doesn't really make sense. Do you see any chance to get that working? |
|
|
|
|
|
#6 | |
|
First Cup of Ubuntu
![]() Join Date: May 2006
Beans: 9
|
Re: HOWTO: Mounting SMB Shares
Quote:
you also said that Code:
sudo smbmount //192.168.1.2/Music /home/dbott/music -o username=dbott,password=mysecretpassword,uid=1000,mask=000 include any other information that you think may be helpful, jay |
|
|
|
|
|
|
#7 |
|
100% Pure Ubuntu
![]() |
Re: HOWTO: Mounting SMB Shares
Great HOWTO. Too bad the thread name is so generic.
|
|
|
|
|
|
#8 | ||
|
Chocolate Ubuntu Mocha Blend
![]() |
Re: HOWTO: Mounting SMB Shares
Quote:
Quote:
|
||
|
|
|
|
|
#9 |
|
Quad Shot of Ubuntu
![]() |
Re: HOWTO: Mounting SMB Shares
VERY basic question here...
I made a directory in ~/Desktop: Code:
|-- RemoteShared | `-- UbuntuLivingroom | `-- Music | |-- Collection1 | |-- Collection2 | |-- Collection3 | |-- Collection4 | |-- Documents | |-- Pictures | `-- ReadWrite my /etc/fstab of the relevant section: Code:
#SAMBA Shares //192.168.11.8/MyMusic1 /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/Collection1 smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 //192.168.11.8/MyMusic2 /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/Collection2 smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 //192.168.11.8/MyMusic3 /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/Collection3 smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 //192.168.11.8/MyMusic4 /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/Collection4 smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 //192.168.11.8/MyDocuments /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/Documents smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 //192.168.11.8/MyPictures /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/Pictures smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 //192.168.11.8/shared /home/marx2k/Desktop/RemoteShared/UbuntuLivingroom/Music/ReadWrite smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0 How do I keep Ubuntu from throwing those extra icons on my desktop automatically? |
|
|
|
|
|
#10 |
|
Chocolate Ubuntu Mocha Blend
![]() |
Re: HOWTO: Mounting SMB Shares
There is a setting in gconf-editor that allows volumes to be hidden/visible on the desktop. From a terminal, type:
Code:
gconf-editor -Dave |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|