[SOLVED]Sharing folders on other hard drives?

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
gto52
Level 3
Level 3
Posts: 101
Joined: Wed Jul 15, 2015 1:23 pm
Location: South Africa

[SOLVED]Sharing folders on other hard drives?

Post by gto52 » Sun Sep 06, 2015 8:00 am

I have set up samba shares, my shares in my HOME folder work fine, but when I allow sharing of other folders on other hard drives in my PC I am unable to access the shares.
I get the message UNABLE TO MOUNT LOCATION,Failed to mount Windows share: Permission denied.
I have searched this forum read the tutorials, but maybe I am just missing something?
Last edited by gto52 on Sun Sep 06, 2015 11:18 am, edited 2 times in total.

altair4
Level 19
Level 19
Posts: 9738
Joined: Tue Feb 03, 2009 10:27 am

Re: Sharing folders on other hard drives?

Post by altair4 » Sun Sep 06, 2015 9:29 am

In order to answer this question properly we really need to know where these folders that you are sharing are located and how you are sharing them. To do that we need to see the output of these commands:

Code: Select all

testparm -s

Code: Select all

net userhsare info --long
If you want me to guess do this:

** Edit /etc/samba/smb.conf as root.
** Add a line in the [global] section - right under the "workgroup=workgroup" line:

Code: Select all

force user = your-user-name
Whatever your user name is.
Then restart smbd:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

gto52
Level 3
Level 3
Posts: 101
Joined: Wed Jul 15, 2015 1:23 pm
Location: South Africa

Re: Sharing folders on other hard drives?

Post by gto52 » Sun Sep 06, 2015 9:35 am

Testpharm -S

Code: Select all

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	workgroup = HOME
	netbios name = COLLEENG31MES2C
	server string = %h server (Samba, Linux Mint)
	server role = standalone server
	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, host, lmhosts, wins
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb

[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
net userhsare info --long

Code: Select all

Invalid command: net userhsare
Usage:
net rpc             Run functions using RPC transport
net rap             Run functions using RAP transport
net ads             Run functions using ADS transport
net file            Functions on remote opened files
net share           Functions on shares
net session         Manage sessions
net server          List servers in workgroup
net domain          List domains/workgroups on network
net printq          Modify printer queue
net user            Manage users
net group           Manage groups
net groupmap        Manage group mappings
net sam             Functions on the SAM database
net validate        Validate username and password
net groupmember     Modify group memberships
net admin           Execute remote command on a remote OS/2 server
net service         List/modify running services
net password        Change user password on target server
net changetrustpw   Change the trust password
net changesecretpw  Change the secret password
net setauthuser     Set the winbind auth user
net getauthuser     Get the winbind auth user settings
net time            Show/set time
net lookup          Look up host names/IP addresses
net g_lock          Manipulate the global lock table
net join            Join a domain/AD
net dom             Join/unjoin (remote) machines to/from a domain/AD
net cache           Operate on the cache tdb file
net getlocalsid     Get the SID for the local domain
net setlocalsid     Set the SID for the local domain
net setdomainsid    Set domain SID on member servers
net getdomainsid    Get domain SID on member servers
net maxrid          Display the maximum RID currently used
net idmap           IDmap functions
net status          Display server status
net usershare       Manage user-modifiable shares
net usersidlist     Display list of all users with SID
net conf            Manage Samba registry based configuration
net registry        Manage the Samba registry
net eventlog        Process Win32 *.evt eventlog files
net printing        Process tdb printer files
net serverid        Manage the serverid tdb
net help            Print usage information



altair4
Level 19
Level 19
Posts: 9738
Joined: Tue Feb 03, 2009 10:27 am

Re: Sharing folders on other hard drives?

Post by altair4 » Sun Sep 06, 2015 9:41 am

I missed an "s":

Code: Select all

net usershare info --long
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

gto52
Level 3
Level 3
Posts: 101
Joined: Wed Jul 15, 2015 1:23 pm
Location: South Africa

Re: Sharing folders on other hard drives?

Post by gto52 » Sun Sep 06, 2015 9:46 am

Code: Select all

[Shares]
path=/media/colleen/Shares/Shares
comment=
usershare_acl=Everyone:R,Unix User\root:F,
guest_ok=y

[Documentries]
path=/media/colleen/Main Backup/Documentries
comment=
usershare_acl=Everyone:R,Unix User\colleen:F,
guest_ok=y

[Public]
path=/home/colleen/Public
comment=
usershare_acl=Everyone:R,Unix User\colleen:F,
guest_ok=y
The Public works as you can see its in the Home folder other 2 don’t.

altair4
Level 19
Level 19
Posts: 9738
Joined: Tue Feb 03, 2009 10:27 am

Re: Sharing folders on other hard drives?

Post by altair4 » Sun Sep 06, 2015 10:06 am

It turns out I had a good guess:

*** Edit smb.conf:

Code: Select all

gksu gedit /etc/samba/smb.conf
*** Add a line under "workkgroup = workgroup" towards the top of the file:

Code: Select all

force user = colleen
*** Save the file and restart smbd:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

gto52
Level 3
Level 3
Posts: 101
Joined: Wed Jul 15, 2015 1:23 pm
Location: South Africa

Re: Sharing folders on other hard drives?

Post by gto52 » Sun Sep 06, 2015 11:17 am

Thanks a million altair4 works perfectly now.

Post Reply

Return to “Other networking topics”