VectorLinux
July 24, 2014, 01:19:42 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: Samba and VL Light problems  (Read 4159 times)
dln9
Member
*
Posts: 16


« on: February 23, 2010, 09:30:25 pm »

I have VL Light installed.  I also have another computer running Ubuntu 9.10.  I am using SAMBA to have both computers "see" each others directories.  (I use SAMBA because at times I need to include a Windows machine.) 

I am at a loss regarding how to set this up in VL.  I have stumbled across a handful of menu items that seem to be related to getting this setup, but I don't know which I have to do first, or even if I should be doing them all.  I've read a good deal of documentation that I could find, but unfortunately I am still confused regarding what the heck they were talking about. 

On the VL machine, if I go to "Network", and then "Windows Networking", it brings up a window that shows the shared directory on the Ubuntu machine.  When I select the option to mount that Ubuntu machine shared directory, it asks for the user name and password - which I assume is the user name and password on the Ubuntu machine - which I enter.  I then get this error message: 


Error Occured While Mounting


This isn't telling me enough, I don't know what to do next. 

In addition, on the Ubuntu machine, it "sees" the VL machine, but it refers to it as a "SFTP FTP drive", whatever that means.  If I try to open it, I get an error message that says that it cannot mount the drive. 


How do I set this up so it works? 

Thanks. 
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #1 on: February 24, 2010, 04:39:26 am »

An update may fix this. Open gslapt, click Edit > Preferences > Sources tab > check the box for "testing" (probably fifth line down). Let it update. Search for "vlsmbmnt" and install it. It may also upgrade your samba version.

The samba user name and password is not automatically the same as computer login user. On default XP, you can usually just use blank values, or username "guest" and blank password. On Linux, you normally need to create samba user credentials, or make the shares public.
Logged
dln9
Member
*
Posts: 16


« Reply #2 on: February 24, 2010, 06:25:21 pm »

Thanks. 

I installed the vlsmbmnt from the test repository, but I still have the exact same problem. 

I'm worried that I have some obscure setting set incorrectly, I really don't know what I"m doing with this stuff, so it is very possilbe that I'm failing to do something critical. 

Does anyone know of a place I can look at that give a fairly simple stepby-step guide to getting this working in VL? 

Or, any other thoughts on how I can get this working? 

Thanks again. 
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #3 on: February 24, 2010, 06:33:30 pm »

Time to use the terminal. Enter the command "smbtree". Just hit enter if it asks for password. What is the output?
Logged
dln9
Member
*
Posts: 16


« Reply #4 on: February 26, 2010, 12:47:14 am »

Oh thank you for helping - I've been going crazy trying to figure this out!  There is so much documentation - seemingly conflicting and confusing documentation - that I didn't know what to do, nor did I know which documentation would apply to my needs, that is still current, or even that I could trust. 

Here is the result of the smbtree command, I ran this on "system4", which is the machine on which VL is running: 

workgroup
   \\system4         vector linux samba server
      \\System4\stylus-cx4600      epson stylus cx4600
      \\system4\ipc$                    ipc service (vector linux samba server)
      \\system4\lexmark              lexmark
   \\system1         system1 server (samba, ubuntu)
      \\system1\shared stuff
      \\system1\ipc$                    ipc service (system1 server (samba, ubuntu))
      \\system1\print$                  printer drivers


I noticed that the shared directory I wanted set up on system4 - called "shared_stuff" - does not appear. 

Each machine has specially designated directories that I want each machine to be able to access - but no other directories.  Also, each machine has a printer attached that I'd like each machine to have access to.  In each case, I'd like each system to require that the system trying to gain access to it has to enter the user name and password of the host system.  So, for example, if system1 tries to look at the directory on system4, the person on system1 has to know and enter the user name and password for system4. 

I've done *a lot* of fiddling with the web-based samba configuration thingy, but that was emotionally draining.  The opton to make the share be available=yes would never "stick" - it would always revert back to no.  I got other settings to change, so I don't think that I was failing to commit the changes.  But, who knows.  Oh well, maybe that doesn't even matter at this point. 

Anyway - any ideas on where to go from here?  Thanks again. 

(PS:  In VL, the terminal program is xterm.  How the heck does a person copy and paste output from that into something else?  I couldn't figure that out, I had to manually type all the output into this posting.  There must be a way to copy from the terminal to the clipboard - Isn't there?) 
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3178



« Reply #5 on: February 26, 2010, 04:40:53 am »

You really don't need samba to do file sharing between 2 linux boxes. Google for sshfs
Logged

nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #6 on: February 26, 2010, 06:05:43 am »

First the easy stuff: To paste to/from xterm, just highlight the text with your mouse, then click the middle button (or mouse wheel) where you want to paste the highlighted text. You can also paste into a terminal with key combination Shift-Insert. Another technique is to re-direct the output of a command to a text file, then open it in an editor. Example: "smbtree > smbtreeoutput.txt".

Effective use of the terminal is a great skill to learn. It is the most accurate and effective way of giving directions in an environment where several different GUI's are in use. There have been many times when I have wished for this option when helping Vista users. Since I stopped using Windows at XP, I don't know where they need to click.

As M0E pointed out, there are more ways of doing this. If you would like to try sshfs, please start a different thread for that.

Staying on samba, I'm interested in finding out why vlsmbmnt doesn't work for you. It is a simple tool that only deals with reading remote shares.

First step: please open a terminal, then issue command "vlsmbmnt". Click through the mounting procedure. Try to use blank values when it asks for username and password. Watch the terminal window for error messages. Copy and paste them into a reply.



Logged
dln9
Member
*
Posts: 16


« Reply #7 on: February 26, 2010, 08:40:30 am »

Here is the ouput you asked to see: 

system4://home/main4
root:# vlsmbmnt 
Mount/Unmount
Mounting [\\SYSTEM1\shared] at [/root/mnt/SYSTEM1-shared]
retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(Cool manual page (e.g. man mount.cifs)


While doing this, I figured out a few things. 

As you can see, I'm trying to access a shared directory on SYSTEM1.  That shared directory is called

shared stuff

with a space embedded in the name.  When I saw the output in the terminal window, I thought, perhaps that space in the name is part of the problem.  So, I went to the SYSTEM1 machine, changed the name of the directory in question to sharedstuff, and tried vlsmbmnt on SYSTEM4 again to access the sharedstuff directory on the SYSTEM1 machine.  And - it worked.  Also, to access the sharedstuff directory on SYSTEM1 from SYSTEM4, I had to enter the username and password for SYSTEM1, which is what I want. 

Then - I tried to access sharedstuff using the menu item NETWORK >> WINDOWS NETWORKING, instead of going through the terminal.  It did not work.  I assume it did not work because using the menu item I was not logged in as root.   

So, here are my questions: 

1)  Does the output I show above from the terminal tell you something else useful that I am overlooking? 

2)  How do I get the menu item NETWORK >> WINDOWS NETWORKING to work while not root? 

3)  How do I get SYSTEM4 (Vector Linux) to deal with directories on other machines that have spaces embedded in their names?  The other machines - Ubuntu, Crunchbang, openSUSE, Windows - don't have a problem with this. 

4)  From SYSTEM1 (Ubuntu), I am able to see SYSTEM4 (VL) as part of the workgroup, but I can't mount - or even see - the directory in SYSTEM4 that I want to share with other machines.  What do I need to do in SYSTEM4 to make that work?  (I am wondering if that is due to the problem with setting the shared drive in SYSTEM4 to available=yes.) 

5)  Bonus question:  Thanks for the tip about using the middle mouse button to paste stuff.  I did not know about that.  However - One benefit of VL is it is lightweight, so I can use really old hardware.  How do I copy and paste from xterm if I have a really old mouse that has only two buttons on it? 

(To MOE-lnx:  Thanks for the reply.  I have Windows in the mix, that is why I am going with SAMBA, my poor understanding is that in such a case SAMBA is the tool to use.  Is that correct?  Anyway, I already have SAMBA set up and running well on five other machines, I'd hate to change it now just because of Vector Linux.  Besides, even if I were to go with sshfs - whatever the heck that is - I'd still want to figure this out.  Supposedly SAMBA is *supposed* to work in VL, and if it isn't working because something is wrong, I'd like to see it fixed, instead of it coming back to bite me months later in some fashion I don't expect.  It is sort of like, I go to the repair shop to get the radio in my car fixed, I wouldn't be satisfied if they said I could set a boombox on the seat and listen to the radio that way instead of fixing the radio.  Finally, I'll admit that right now I'm all googled-out, I can't start from scratch on sshfs right now.  There is a HUGE problem with Google stuff, and that is that there is no quality control.  I can find lots of documentation out there, but is it any good?  Is it complete?  Is it up-to-date?  Is it good practice?  When you're new to some topic, you're not in a position to know what you're looking at.) 
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #8 on: February 26, 2010, 09:14:30 am »

There is progress here. Smiley

1. As you can tell, launching programs from a terminal can provide a lot of useful information. You correctly deduced that the space in the share name was a problem, and fixed that. It also gave me a good bug report, I will look into the issue. No other problems are indicated in that output, though.

2. The latest update to vlsmbmnt should have fixed the mounting issue. Would you try to re-install it using gslapt, then launch it from a terminal as regular user?

vlsmbmnt is bare bones simple, and does not have the capabilities of Ubuntu's file manager. If you want that kind of automation, you can install "kdebase" on Light. It gives you much improved networking capabilites at the cost of some performance loss.

3. To troubleshoot why you can't see any shares on SYSTEM4, post the content of your file "/etc/samba/smb.conf".

4. With a two button mouse, you can emulate a middle button by pressing both buttons at once. This is enabled by adding a line to the "InputDevice" section of the file /etc/X11/xorg.conf:
Code:
Option “Emulate3Buttons” “true”
Logged
dln9
Member
*
Posts: 16


« Reply #9 on: February 26, 2010, 09:51:58 am »

The option to reinstall the vlsmbmnt package was greyed out, so I uninstalled vlsmbmnt, and then reinstalled it. 

After that, here is what a regular user gets when running vlsmbmnt from the terminal: 


system4:/~
main4:$ vlsmbmnt
bash: vlsmbmnt: command not found
system4:/~


Just for the heck of it, I tried it from the terminal as root, and it still worked.  So, the problem appears to be that I can't run vlsmbmnt when not logged in as root.  (You probably already suspected that.) 


Here are the contents of /etc/samba/smb.conf: 


# Samba config file created using SWAT
# from UNKNOWN (µ·ðcK)
# Date: 2010/02/26 11:52:26

[global]
   server string = Vector Linux Samba Server
   log file = /var/log/samba.%m
   max log size = 50
   dns proxy = No

[printers]
   comment = All Printers
   path = /var/spool/samba
   guest ok = Yes
   printable = Yes
   browseable = No
   browsable = No

[/home/main4/our_stuff/shared_stuff]
   read only = No
   guest ok = Yes
   available = No

[lexmark]
   comment = lexmark
   path = /var/spool/samba
   read only = No
   guest ok = Yes
   printable = Yes
   printer name = lexmark
   oplocks = No
   share modes = No
[printers]
   comment = All Printers
   path = /var/spool/samba
   guest ok = Yes
   printable = Yes
   browseable = No
   browsable = No
Logged
bigpaws
Vectorian
****
Posts: 1843


« Reply #10 on: February 26, 2010, 10:56:29 am »

There is always samba by example.

The next place to start would be the log file

That would give you a clue about the problem. Did you add the
users to the system and the smbpasswd?

Bigpaws
Logged
dln9
Member
*
Posts: 16


« Reply #11 on: February 26, 2010, 11:19:10 am »

Thanks for the input, bigpaws. 

I know emails, postings, etc., can easily be misunderstood.  I am glad for your (and others responses), so please know that my following questions are very sincere, don't take them in a bad way. 

I have no idea what "samba by example" is. 

I don't know what is meant by "the log file".  Where does one find it, and what would it contain that would help out? 

When you asked about adding users to the system and to the smbpasswd:  *Which* users did you have in mind?  How (and why) does one add users to a system and to a smbpasswd?  And, what is "the smbpasswd" to which I need to add users?  Anyway, not knowing anything about users and smbpasswd, the answer is, No, I did not add users to the system nor to the smbpasswd.  At least, not knowingly. 
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3178



« Reply #12 on: February 26, 2010, 11:54:16 am »

Whenever I get stuck with something like this, I go back to the default configuration, and I think that's what bigpaws meant by 'samba by exmple'.
You should have a /etc/samba/smb.conf.new or /etc/samba/smb.conf-sample file which has the default configuration.

Remove your edited file, and make a cope of the .new or .conf-sample file (whichever one exists) as /etc/samba/smb.conf

Add a configuration for a shared directory first
restart your samba server
and try smbclient -L localhost
if that shows your shared directory, that means you're in the right path... keep going

otherwise, fix your configuration.
Logged

nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #13 on: February 26, 2010, 11:55:17 am »

Okay, you need to enter "/sbin/vlsmbmnt" as regular user. Please try that.

-------------------------------------------------------------------------------------------
Now, for your smb.conf file, let's start with a very simple one, similar to XP's "simple file sharing":
Add this line to the [Global] section:
Code:
security = share
Change this section:
Code:
[/home/main4/our_stuff/shared_stuff]
   read only = No
   guest ok = Yes
   available = No
to this; (don't include my comments);
Code:
[shared_stuff]
   comment = something                                  <------ optional, whatever
   path = /home/main4/our_stuff/shared_stuff            <------ my assumption
   read only = no
   public = yes
   browseable = yes
The directory /home/main4/our_stuff/shared_stuff must be readable/writable for users.

Save the file and restart samba:
Code:
/etc/rc.d/init.d/samba restart
Wait 7 minutes, then try to browse to your VL box.

-----------------------------------------------------
After you get this working, now add security. Change the line:
Code:
security = share
to:
Code:
security = user

Yes, you need to add users and passwords to samba. As root, issue command:
Code:
smbpasswd -a main4
(enter password twice)

Change the share definition:
Code:
[shared_stuff]
   comment = something
   path = /home/main4/our_stuff/shared_stuff
   read only = no
   browseable = yes
   create mask = 0666
   directory mask = 0777
   valid users = main4

Restart samba again and test. It should now require username and password.
« Last Edit: February 26, 2010, 11:59:37 am by nightflier » Logged
bigpaws
Vectorian
****
Posts: 1843


« Reply #14 on: February 26, 2010, 12:29:27 pm »

http://www.samba.org/samba/docs/man/Samba-Guide/

This guide is called Samba by Example

This is written by the folks that develop samba

HTH

Bigpaws
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!