How do I share folders? - Solved

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
sqlpython
Donor
Posts: 310
Joined: 13. Aug 2010, 04:53
Location: Ct. USA

Re: How do I share folders?

Post by sqlpython »

@Paul
One more question as to your last post quote
I have gone into the root with the terminal and typed the commands given above by knome.
I can't find any commands given by @knome ?????
Slackware ( Manjaro ) Salix, AntiX, Bunsen, Calculate
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: How do I share folders?

Post by paul »

Sorry sqlpython, of course I was following your instructions. I have managed to get the network printing side going, by downloading and installing the printer applet, which to my great surprise did not come with the install. I have also managed to change the network name to what it was before. I must say though that I am a bit flabbergasted as to why the machine is not visible on the Windows network; it is very strange. I think it must be some security setting, as the same situation exists with two Android devices we have here. Paul.
User avatar
sqlpython
Donor
Posts: 310
Joined: 13. Aug 2010, 04:53
Location: Ct. USA

Re: How do I share folders?

Post by sqlpython »

No apologies necessary. :)
Just trying to help.
If you decided to post the CLI syntax and pursue the Samba config I will help as I can.

Good luck.. ;)
Slackware ( Manjaro ) Salix, AntiX, Bunsen, Calculate
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: How do I share folders?

Post by paul »

Hello sqlpython, I have checked all possible external factors. My router shows the machine connected together with its correct MAC address.
But this machine is not visible on the Windows network. I have checked the Windows network with a network scanner, and again the machine is present; I would say that the problem lies in the fact that nothing is shared on this Salix notebook.
I have at present exactly the same smb.conf as given previously in this post, except that I have changed the shared folder from /home/paul/Download to /home/paul/Downloads so it points to an actual existing directory.
When I type from the command line "smbclient "\\\localhost\Downloads" -U paul" it comes up with "Error NT_STATUS_CONNECTION_REFUSED" Changing the line to "\\\home\paul\Downloads" and a few other lines I have tried also come up with an error.
I have used history to ensure I entered everything correctly as per the foregoing instructions and that appears to be the case. I have also made the special custom actions in Thunar file manager to share and unshare folders as per the blog given in the link in this post, but to no avail. So I am pretty well stumped. if you can let me know what information you need off this machine, I will post it. Thanks, Paul.
User avatar
sqlpython
Donor
Posts: 310
Joined: 13. Aug 2010, 04:53
Location: Ct. USA

Re: How do I share folders?

Post by sqlpython »

Ok, You have checked the command syntax yourself.
We would be safer if we could see copies from your terminal History.
Reason being that you believed you had the syntax correct and used Downloads vs. Download.
Just like writing a letter. I do my very best to have no errors but hand it to another person and they immediately find errors that you didn't see.
You may very well have no command errors but then again we don't know that for sure.

Ok , that aside.
You state that you followed the Thunar share-plugin How To.. which is very good.
But Half the Samba commands in that How To are commands that I gave you and you had already performed. Some should produce and error. DId you get any. ? What were they.
As there was no need to perform the commands again..

Next Did you alter from the Thunar shares-plugin How To page with any of the following.

Code: Select all

  [global]
  workgroup = WORKGROUP
  security = share
  usershare path = /var/lib/samba/usershares
  usershare max shares = 100
  usershare allow guests = yes
  usershare owner only = yes
If you did then you altered the smb.conf which I posted.
Not needed nor wanted.
Change Only the following individual lines Three above & do not alter other lines to appear (read as) as No Duplications of these lines. In other words don't have both security =user and security =share

Code: Select all

security = user
#usershare owner only = yes
#usershare path = /var/lib/samba/usershares
Make certain User is enabled

Code: Select all

smbpasswd -e paul
Restart Samba

Code: Select all

/etc/rc.d/rc.samba restart
and test in the loopback

Code: Select all

smbclient "\\\localhost\Downloads"
You should immediately get back

Code: Select all

Enter paul's password:
Do You?
If you get errors post them
Without seeing the rest of what you've done that is all the help I can be.
Slackware ( Manjaro ) Salix, AntiX, Bunsen, Calculate
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: How do I share folders?

Post by paul »

Hello sqlpython, thanks for that.
Here is the copied listing of my current smb.conf:
-------------------------------------------------
[global]
Workgroup = MSHOME
server string = %h server (Salix)
panic action = /usr/share/samba/panic-action %d
log file = /var/log/samba/log.%m
usershare allow guests = Yes
####### Authentication #######
security = user
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0

max log size = 1000
name resolve order = bcast lmhosts host wins
printcap name = cups
dns proxy = No

usershare max shares = 100
map to guest = Bad User

idmap config * : backend = tdb

########## Printing ##########

# cupsys-client package.
printing = cups
printcap name = cups

########## Share Definitions ##########
[homes]
comment = Home Directories
valid users = paul
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[PUBLIC]
path = /home/paul/Downloads
valid users = paul
read only = No
create mask = 0775
---------------------------------------------------
These are the copied entries from the Thunar file manager:
Samba folder share: "net usershare add %n %f "" Everyone:R guest_ok=y && chmod 777 %f"
Samba folder unshare: "net usershare delete %n"

Some comments:
workgroup = MSHOME works, if I put "WORKGROUP" or anything else there I lose all access to the network.
Strangely the Salix on little notebook refused to accept my user name and password and start this morning.
A reboot was successful and now I can see the device (named "gandalf" - after our Border Collie) on the network for the first time.
When I type: "smbclient "\\\localhost\Downloads"" and type in my password it comes up "password for root" and when I enter that I get the error: "Error NT_STATUS_BAD_NETWORK_NAME"
Maybe the network name (which is "merlin" not MSHOME, which is the workgroup name) should be declared in smb.conf.
Again I am only guessing.
I am also guessing that the strange behaviour of the little machine this morning was due to a system update just before shutdown last night.
I guess the thing is sort of working as expected now, but if possible I would still like to fix that network name error.
Thanks again, Paul.
User avatar
sqlpython
Donor
Posts: 310
Joined: 13. Aug 2010, 04:53
Location: Ct. USA

Re: How do I share folders?

Post by sqlpython »

@paul
A few tests to help you.
Ok, is merlin the server name of an individual machine?
Is that the netbook?

Try these tests and post results.

1.

Code: Select all

testparm
..post results again
2. as su

Code: Select all

 ifconfig
look at the inet results for the device as that is your ipaddress
3.

Code: Select all

nmblookup mshome
results
4.

Code: Select all

nmblookup mshome
results ..is your machine's ipadress listed
Now use your (not 192.168.1.130) machine's found ipaddress in the query below

Code: Select all

 smbclient -L 192.168.1.130
Ok results ?
Slackware ( Manjaro ) Salix, AntiX, Bunsen, Calculate
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: How do I share folders?

Post by paul »

Hello sqlpython, here are the dumps as requested:
----------------------------------------------------------------------------------------------
root[paul]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[PUBLIC]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
workgroup = MSHOME
server string = %h server (Salix)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
name resolve order = bcast lmhosts host wins
printcap name = cups
dns proxy = No
usershare allow guests = Yes
usershare max shares = 100
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

[homes]
comment = Home Directories
valid users = paul
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
print ok = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[PUBLIC]
path = /home/paul/Downloads
valid users = paul
read only = No
create mask = 0775


root[paul]# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:d0:59:4b:53:c5 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 162 bytes 12240 (11.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 162 bytes 12240 (11.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.6 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::21b:11ff:feca:5d2 prefixlen 64 scopeid 0x20<link>
ether 00:1b:11:ca:05:d2 txqueuelen 1000 (Ethernet)
RX packets 145 bytes 19524 (19.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 147 bytes 17536 (17.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


root[paul]# nmblookup mshome
querying mshome on 192.168.1.255
192.168.1.6 mshome<00>
192.168.1.3 mshome<00>
192.168.1.2 mshome<00>
192.168.50.1 mshome<00>


root[paul]# smbclient -L 192.168.1.6
Enter root's password:
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.6.8]

Sharename Type Comment
--------- ---- -------
homes Disk Home Directories
print$ Disk Printer Drivers
PUBLIC Disk
IPC$ IPC IPC Service (gandalf server (Salix))
HP-Deskjet-930c Printer HP Deskjet 930c
HP-LaserJet-M2727-MFP Printer HP LaserJet M2727 MFP
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.6.8]

Server Comment
--------- -------
GANDALF gandalf server (Salix)
GWYDION gwydion

Workgroup Master
--------- -------
MSHOME GWYDION
--------------------------------------------------------------------------------------------------
Comments:
I presume you meant the "nmblookup mshome" to be listed once, as each listing gave the same result.
The IP address of this Salix notebook is 192.168.1.6
This is set to reserved on the router for the notebook's MAC address.
I also have MAC filtering active on on the router, with the Salix notebook's MAC address listed to accept.
The name of the network "merlin" is not listed, which surprises me as Ubuntu needs this for its symlinks.
The name "gwydion" refers to a small NAS that runs "snake OS"
In the last listing you can also see the two network printers that actually work fine.
Thanking you, Paul.
User avatar
sqlpython
Donor
Posts: 310
Joined: 13. Aug 2010, 04:53
Location: Ct. USA

Re: How do I share folders?

Post by sqlpython »

@paul
Seems like you have a Nicely working Samba Network there. :)

testparm.. would show syntax errors. I see none. Good.

ifconfig ... confirms your ipaddress and BTW I use MAC addressing in my SAMBA network.

nmblookup mshome .. confirms the ip is on the network

smbclient -L 192.168.1.6 .. shows SAMBA sees and uses the ipaddress
which you did as root
Also means to me that you have given root a Working SAMBA password somehow.
.............Not usual on a small network

Now I would wager that if you became root and then

Code: Select all

smbclient "\\\localhost\Downloads" -U root"
entered your SAMBA root password you would see
smb: \>
the samba prompt
Because you cannot use the root password.
root must have it's own SAMBA passwork to work in that prompt.
You have to make certain that PAUL has a SAMBA password.
Without it or with an incorrect SAMBA password you would see
A SAMBA network error.

So, my suggestions would be to first check what may be a syntax error on your part.
Secondly, if that turns out not to be a syntax error only a posting error here. To then re-establish PAUL with the GROUP and A smbpasswd for PAUL.
I know you attempted this before but "Once more unto the breach, ". :)

To begin I see in your previous post outside quotation marks in the command
As you see below in red . Incorrect eliminate and try again.
" smbclient "\\\localhost\Downloads" -U paul "
You should get a password prompt like so

Code: Select all

Enter paul's password:
If you continue to see the NT_Network error then the SAMBA user paul most probably is not correctly established as a SAMBA user because your SAMBA network seems functional to my eye. (Based on your last post )

To re-establish the user paul in the SAMBA network as a user with a password follow all the same steps which I will list again below ..
First Check that paul is a member of the sambashares GROUP in two ways..

Code: Select all

id paul
&

Code: Select all

cat /etc/group
IF paul's GROUP = sambashare THEN to smbpasswd below
ELSE

Code: Select all

  usermod -a -G sambashare paul

Continue

Code: Select all

smbpasswd -a paul
smbpasswd -e paul
once again

Code: Select all

smbclient "\\\localhost\public" -U paul
Post results
Slackware ( Manjaro ) Salix, AntiX, Bunsen, Calculate
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: How do I share folders?

Post by paul »

Hello sqlpython, thanks for that, everything works fine, except the:
smbclient "\\\localhost\Downloads" -U paul
command, which still comes up with
Error NT_STATUS_BAD NETWORK_NAME
I just wonder whether this relates to the fact my Windows network does not use a user name or password (that is the default); and the Windows network is therefore at fault.
Anyhow, please see the list of my efforts on the terminal, below.
-----------------------------------------------------------------------------------------
paul[~]$ su
Password:
root[paul]# smbclient "\\\localhost\Downloads" -U root
Enter root's password:
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.6.8]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
root[paul]# smbclient "\\\localhost\Downloads" -U paul
Enter paul's password:
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.6.8]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
root[paul]# cat /etc/group
root:x:0:root
bin:x:1:root,bin
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm
lp:x:7:lp,paul
mem:x:8:
kmem:x:9:
wheel:x:10:root
floppy:x:11:paul
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
dialout:x:16:uucp
audio:x:17:paul
video:x:18:paul
cdrom:x:19:paul
games:x:20:
slocate:x:21:
utmp:x:22:
smmsp:x:25:smmsp
tape:x:26:
mysql:x:27:
rpc:x:32:
sshd:x:33:sshd
gdm:x:42:
shadow:x:43:
ftp:x:50:
oprofile:x:51:
apache:x:80:
messagebus:x:81:
haldaemon:x:82:
plugdev:x:83:paul
power:x:84:paul
netdev:x:86:paul
pop:x:90:pop
scanner:x:93:paul
nobody:x:98:nobody
nogroup:x:99:
users:x:100:
console:x:101:
sambashare:x:1000:paul,nobody
root[paul]# usermod -a -G sambashare paul
root[paul]# smbpasswd -a paul
New SMB password:
Retype new SMB password:
root[paul]# smbpasswd -e paul
Enabled user paul.
root[paul]# smbclient "\\\localhost\public" -U paul
Enter paul's password:
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.6.8]
smb: \> exit
root[paul]# smbclient "\\\localhost\Downloads" -U paul
Enter paul's password:
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.6.8]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
root[paul]#
------------------------------------------------------------------------------------------------------
Post Reply