LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-19-2012, 08:53 AM   #16
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by 414N View Post
It would be useful to know what didn't work and how it didn't work (error messages etc.).
If you really want to go down the samba route (with no Windows machines on the network this is kinda useless, but whatever...), make sure that samba is alive and working well on the server by using, on one of the desktop machines:
Code:
smbclient -L //pos-ubuntu
if pos-ubuntu is the network name of the server. If it asks for a password and you didn't set one on the server, leave it blank and press enter: you should then see a list of samba shares on the server specified. This means that the samba server is working ok.
After this first test, you should try mounting the shares on the server on one of the desktop machines as already written in the previous posts. Make sure that /sbin/mount.cifs and/or /sbin/mount.smbfs exist, as mount relies on them to actually mount a samba share on the filesystem. If they don't exist, then you're missing the smbfs package and you should install it.
Ok, done the
Code:
smbclient -L //pos-ubuntu
and it replied:
Code:
Domain=[LOURI] OS=[Unix] Server=[Samba 3.6.3]

	Sharename       Type      Comment
	---------       ----      -------
	IPC$            IPC       IPC Service (ITX)
	share           Disk      
	print$          Disk      Printer Drivers
	EPSON-TM-P2.01  Printer   EPSON TM-P2.01
	Kyocera-Mita-FS-1118MFP Printer   Kyocera Mita FS-1118MFP
So it seems that samba ir working ok.

Last edited by joint; 09-19-2012 at 09:04 AM.
 
Old 09-19-2012, 09:12 AM   #17
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Have you reconfigured samba on the server machine, i.e. have you restored a /etc/samba/smb.conf backup from the previous server? Is samba actually running on the server after the reinstall of the OS? EDIT: written before reading the answer.
As already explained before, the reason you're getting that message is because the file manager you're using (I guess it's nautilus) has associated to the action "Create link" the command "ln -s X", which creates a symbolic link. All is fine if you're inside a directory of the filesystem (i.e. a subdirectory of /), but when you're browsing unmounted network shares via specific URIs (like ftp://, smb://, mtp:// etc.) that action will fail miserably because (<WARNING>figurative explanation ahead</WARNING>) "you're putting the nose in an alien territory unknown to your filesystem, which only knows entities under /". The file manager has access to those shares/protocols via external programs/plugins/libraries, so that's why you can't, for example, directly cd into smb://someShare. I hope this clears any doubt about it permanently.
Now, please make sure you've got all that's needed on the client machines to mount those shares, i.e. check for /sbin/mount.cifs or /sbin/mount.smbfs.

Last edited by 414N; 09-19-2012 at 09:15 AM. Reason: Previous post edited by OP
 
Old 09-19-2012, 09:21 AM   #18
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 414N View Post
Have you reconfigured samba on the server machine, i.e. have you restored a /etc/samba/smb.conf backup from the previous server? Is samba actually running on the server after the reinstall of the OS? EDIT: written before reading the answer.
As already explained before, the reason you're getting that message is because the file manager you're using (I guess it's nautilus) has associated to the action "Create link" the command "ln -s X", which creates a symbolic link. All is fine if you're inside a directory of the filesystem (i.e. a subdirectory of /), but when you're browsing unmounted network shares via specific URIs (like ftp://, smb://, mtp:// etc.) that action will fail miserably because (<WARNING>figurative explanation ahead</WARNING>) "you're putting the nose in an alien territory unknown to your filesystem, which only knows entities under /". The file manager has access to those shares/protocols via external programs/plugins/libraries, so that's why you can't, for example, directly cd into smb://someShare. I hope this clears any doubt about it permanently.
Now, please make sure you've got all that's needed on the client machines to mount those shares, i.e. check for /sbin/mount.cifs or /sbin/mount.smbfs.
Got both mount.cifs and mount.smbfs.
 
Old 09-19-2012, 09:26 AM   #19
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Perfect.
Let's try to mount some shares, then
Code:
sudo mkdir -p /media/pos-ubuntu-share/
sudo mount -t cifs //pos-ubuntu/share /media/pos-ubuntu-share OPTS
This mounts //pos-ubuntu/share in /media/pos-ubuntu-share/ after creating this folder (you can change it anyway you please).
Try first with an empty OPTS. If it doesn't work, we'll figure out the required mount options.
If it works, a simple
Code:
ls -l /media/pos-ubuntu-share/
should list all files contained in that share and
Code:
ln -s /media/pos-ubuntu-share /tmp/share
should create a symbolic link to /media/pos-ubuntu-share/ under /tmp.
 
Old 09-19-2012, 09:39 AM   #20
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 414N View Post
Perfect.
Let's try to mount some shares, then
Code:
sudo mkdir -p /media/pos-ubuntu-share/
sudo mount -t cifs //pos-ubuntu/share /media/pos-ubuntu-share OPTS
This mounts //pos-ubuntu/share in /media/pos-ubuntu-share/ after creating this folder (you can change it anyway you please).
Try first with an empty OPTS. If it doesn't work, we'll figure out the required mount options.
If it works, a simple
Code:
ls -l /media/pos-ubuntu-share/
should list all files contained in that share and
Code:
ln -s /media/pos-ubuntu-share /tmp/share
should create a symbolic link to /media/pos-ubuntu-share/ under /tmp.
By doing this:
Code:
sudo mount -t cifs //pos-ubuntu/share /media/pos-ubuntu-share OPTS
I get the usage instructions.
And with this:
Code:
sudo mount -t cifs //pos-ubuntu/share /media/pos-ubuntu-share
I get this:
Code:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Sorry, m8, for me being such a noob and making you have a hard time...

Last edited by joint; 09-19-2012 at 09:46 AM.
 
Old 09-19-2012, 09:46 AM   #21
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
OPTS was meant to be a placeholder for other mount options, if needed. You shouldn't use it on the command line.
What is the security level configured on the samba server?
Try first with smbfs instead of cifs, then, if neither works without additional options, try using:
Code:
sudo mount -t cifs //pos-ubuntu/share /media/pos-ubuntu-share -o username="",password=""
if you haven't configured access restrictions on the server.
 
Old 09-19-2012, 09:57 AM   #22
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 414N View Post
OPTS was meant to be a placeholder for other mount options, if needed. You shouldn't use it on the command line.
What is the security level configured on the samba server?
Try first with smbfs instead of cifs, then, if neither works without additional options, try using:
Code:
sudo mount -t cifs //pos-ubuntu/share /media/pos-ubuntu-share -o username="",password=""
if you haven't configured access restrictions on the server.
Whatever I try I always get this:
Code:
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
The security level is "User" (if it's this what you mean).
 
Old 09-19-2012, 10:21 AM   #23
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
mm, is it already mounted elsewhere?
Try looking at mount output.
Try also using user="" instead of username="" in the mount command.
 
Old 09-19-2012, 10:31 AM   #24
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 414N View Post
mm, is it already mounted elsewhere?
Try looking at mount output.
Try also using user="" instead of username="" in the mount command.
M8, I think that's it!!! WOW!! I tried 'user' instead of 'username'.

Now, how do I create a symb. link. in desktop to these mounted folders?
 
Old 09-19-2012, 10:37 AM   #25
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Slow down, we have to add that to fstab first
Open up the /etc/fstab file with your favorite text editor using sudo (only root can modify it) and add the following line:
Code:
//pos-ubuntu/share      /media/pos-ubuntu-share      cifs      defaults,auto,user="",password=""  0  0
Note on the "auto" option: using auto makes the system mount the samba share at boot-time. This means that it has to be available at boot or you'll lose some time waiting for the mount process to timeout because it cannot reach the server. Knowing this, make your own decision.
To link that folder on your user desktop simply run:
Code:
cd ~/Desktop
ln -s /media/pos-ubuntu-share WHATEVER_NAME_YOU_LIKE
as your normal user (not root and not using sudo).
 
1 members found this post helpful.
Old 09-19-2012, 10:39 AM   #26
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
I GOT IT!!!!

I used ln -s and TADAHHH!!

Thank you a million times for your patience and knowkedge, m8!!

Cheers
 
Old 09-19-2012, 10:42 AM   #27
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
Glad it is solved
Please mark the thread as solved, too.
 
Old 09-21-2012, 05:41 AM   #28
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
M8, everything works ok but one thing: After restart all symb links stop to work.

I've created a shortcut folder on my desktop to the mounted folder, everything works perfect. But after restart a locker appears on the icon and it no longer works. It opens the folder, no errors whatsoever, but it's blank with nothing in it.

Last edited by joint; 09-21-2012 at 05:53 AM.
 
Old 09-21-2012, 06:05 AM   #29
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 647

Rep: Reputation: 189Reputation: 189
It means that the auto-mount doesn't work.
Have you modified the /etc/fstab file as previously suggested?
Does
Code:
sudo mount /media/pos-ubuntu-share
display something?
 
Old 09-21-2012, 06:16 AM   #30
joint
Member
 
Registered: Apr 2005
Distribution: Debian Jessie
Posts: 92

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 414N View Post
It means that the auto-mount doesn't work.
Have you modified the /etc/fstab file as previously suggested?
Does
Code:
sudo mount /media/pos-ubuntu-share
display something?
No, I didn't modify.
Which lines sould I add, then?

My fstab looks like this:
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=3d7aad7f-be21-4fea-9231-495cca6bb634 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=6a66a76d-ed47-4b4b-b38d-c20e2d651469 none            swap    sw              0       0
/dev/sr0        /media/floppy0  auto    rw,user,noauto,exec,utf8 
0       0

Last edited by joint; 09-21-2012 at 06:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar: "preserve the symbolic links" julian16 Linux - Newbie 3 02-04-2012 11:24 PM
"creating symbolic link" "operation not permitted" wheni Linux - Newbie 3 05-08-2011 01:36 AM
"Too many levels of symbolic links" Problem Corallis Linux - Newbie 5 07-12-2004 01:18 PM
ProFTPD - "Too many levels of symbolic links" orange400 Linux - Software 5 04-29-2004 06:55 AM
Can't mount CDROM: "Too many levels of symbolic links" wycolorado Linux - Newbie 10 08-15-2003 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration