LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2011, 09:56 PM   #1
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
need help mounting a samba share in debian squeeze


i tried the smbmount command like this
Code:
# smbmount //DEBIAN/homes /home/baronobeefdip/share -o username=baronobeefdip
and then i get an error instead of my shared files
Code:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
i assure that the /home/baronobeefdip/share directory exsists and i am using the username and password that exsist on the server's system (the username is baronobeefdip and the password i would like to keep secret)

what am i doing wrong here because something is wrong

and for refernece here is the result from the
Code:
smbtree -N
command
Code:
smbtree -N
WORKGROUP
	\\DEBIAN         		debian floor computer
		\\DEBIAN\IPC$           	IPC Service (Debian Server Baronobeefdip Bedroom)
		\\DEBIAN\homes          	stuff
MSHOME
	\\DEBIAN         		Debian Server Baronobeefdip Bedroom
		\\DEBIAN\IPC$           	IPC Service (Debian Server Baronobeefdip Bedroom)
		\\DEBIAN\homes          	stuff
	\\BARONOBEEFDIP-DE		baronobeefdip-desktop server (Samba, Ubuntu)
		\\BARONOBEEFDIP-DE\IPC$           	IPC Service (baronobeefdip-desktop server (Samba, Ubuntu))
		\\BARONOBEEFDIP-DE\print$         	Printer Drivers
i want to the get one that is commented as the "debian floor computer"
 
Old 05-12-2011, 09:59 PM   #2
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
i also read that you can mount a share with the mount command so i tried it like this
Code:
mount -t smbfs -o username=baronobeefdip,password=<private> //DEBIAN/homes /home/baronobeefdip/share
mount error(13): Permission denied
still have nothing so what do i do
 
Old 05-12-2011, 10:01 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I never mount my samba-shares with smbmount, so I can't comment on that. For me always works something like this:
Code:
mount -t cifs -o user=tobi,password=XXXXXXXXX //server/share /server
Note, I use user, not username, maybe that is the culprit.
 
Old 05-12-2011, 10:28 PM   #4
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
another confusing fact here

do i put the unc in as //DEBIAN/homes or \\DEBIAN\homes?

and does the username and password have to be on machine that is acting as the server?
 
Old 05-12-2011, 10:40 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by baronobeefdip View Post
and does the username and password have to be on machine that is acting as the server?
Isn't that pretty obvious? How should the server know the user and password of your local machine? Of course you have to have that on the server.

Regarding the slashes, I always use the forward slash (/), as it is standard in Linux/Unix. The variant with the backslashes will work, but since the backslash is a special character you have to escape it. The address of the server would look like this: \\\\server\\share. The variant with forward slashes is a lot more convenient.
 
Old 05-12-2011, 10:45 PM   #6
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
well i changed some things to make everything more distinguished, there isn't anything in the network that resembles each other in names so now i have this when i run smbtree -N
Code:
MSHOME
	\\FLOOR          		debian floor computer
		\\FLOOR\IPC$           	IPC Service (debian floor computer)
		\\FLOOR\crazykitty     	pictures on the floor computer
	\\DEBIAN         		Debian Server Baronobeefdip Bedroom
		\\DEBIAN\IPC$           	IPC Service (Debian Server Baronobeefdip Bedroom)
		\\DEBIAN\pictures       	pictures on the system
	\\BARONOBEEFDIP-DE		baronobeefdip-desktop server (Samba, Ubuntu)
		\\BARONOBEEFDIP-DE\IPC$           	IPC Service (baronobeefdip-desktop server (Samba, Ubuntu))
		\\BARONOBEEFDIP-DE\print$         	Printer Drivers
i want to connect to the FLOOR server and the crazykitty share i ran your command
Code:
mount -t cifs -o user=baronobeefdip,password=xxxx //FLOOR/crazykitty /home/baronobeefdip/share
i get this
Code:
mount error: could not resolve address for FLOOR: Unknown error

Last edited by baronobeefdip; 05-12-2011 at 10:48 PM.
 
Old 05-12-2011, 10:56 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Do you have FLOOR in your /etc/hosts?
 
Old 05-12-2011, 10:59 PM   #8
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
i don't think so and how do i add the host to the file, i opened it with gedit and this is what is there
Code:
127.0.0.1	localhost
127.0.1.1	debian

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
 
Old 05-12-2011, 11:12 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Code:
127.0.1.1	debian
How did you get this entry?
If debian is the hostname of that computer the IP should be 127.0.0.1, not 127.0.1.1.

To add FLOOR to the hosts file just add a line like this:
Code:
192.168.0.2   FLOOR
Of course you have to replace the IP with the actual IP of that machine.
 
Old 05-12-2011, 11:31 PM   #10
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
i have no idea how debian got there, i just opened the file and it was just there, it must be another server on the network that i can't locate or something left behind from another time, i think i know the ip address for the FLOOR server. i ran the ifconfig command and found the inmterface it's using to connect to the LAN and this is what i collected

Code:
wlan0     Link encap:Ethernet  HWaddr 00:13:f7:e9:37:18  
          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:f7ff:fee9:3718/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6498 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5778 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6448769 (6.1 MiB)  TX bytes:2903104 (2.7 MiB)
i'm guessing that the ip address for the server is 192.168.1.104

and if it's not too much trouble how do you find the ip address of a server without physical access to it,i want to be able to find the ip address of the server remotely

i just ran the command again
Code:
mount -t cifs -o user=baronobeefip,password=xxxxxx //FLOOR/crazykitty /home/baronobeefdip/share
and i got this
Code:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
the entered username and password are right so what could the problem be now

Last edited by baronobeefdip; 05-12-2011 at 11:36 PM.
 
Old 05-13-2011, 12:06 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
When you issued the ifconfig command on the client then it is the clients IP, not the server's.
If the server is on the same LAN as your client you can find its IP with a scan of the LAN. You can do that (assuming you have nmap installed on the client machine) with
Code:
nmap -sP 192.168.1.0/24
It will show up all machines on the local subnet.
 
Old 05-13-2011, 12:19 AM   #12
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
i issued the command on the server not the client so this is the server's ip address. i added it to the /etc/hosts document along with the name of the server FLOOR, saved it and ran this command and LO AND BEHOLD IT WORKED!!!

Code:
smbmount //FLOOR/crazykitty /home/baronobeefdip/share -o username=baronobeefdip
but the only thing that i want to be able to do is obtain the ip address of the server without physical access to it, i want to obtain it remotely. i did the command on the server to do that
 
Old 05-13-2011, 12:23 AM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by baronobeefdip View Post
i issued the command on the server not the client so this is the server's ip address.
I am confused about this one, if you issued the command on the server it can't be the client's IP. I hope that this is just a typo.

To get the IP address remotely try the nmap command I recommended. You can run that from any machine on your net that has nmap installed, and it will show up the IPs of every machine in your local subnet that reacts to pings.
 
Old 05-13-2011, 12:58 AM   #14
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
thanks that really worked i ran it like this
Code:
#nmap -sP 192.168.1.1/24
as i understand these are the defaults the 192.168.1.1 is the router's ip on average this is always the router's ip and the /24 is short for the subnet, it's applying the default 255.255.255.0

how do you unmount the share? google searching for the answer turned up fruitless

Last edited by baronobeefdip; 05-13-2011 at 01:26 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
mounting samba share glock19 Linux - General 13 07-15-2013 08:50 PM
Need some HELP for Samba on Squeeze Debian with dockstar acetonitrile Debian 2 03-12-2011 10:27 PM
LXer: How to install and Configure SAMBA in Debian Squeeze LXer Syndicated Linux News 0 02-26-2011 11:04 PM
Trouble mounting Samba share from Windows Mobile 6.1 - samba weirdness cleidh_mor Linux - Server 0 09-21-2008 02:43 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:48 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