LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-26-2012, 09:47 PM   #1
atiqjaved
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
Unable to connect to map samba shared folder in windows


Aim

Create a called Shared_folder which can be accessed by ALL users (group name = users). Therefore, in order to map the drive in windows, the user is promoted to enter valid user credentials.

Issue

I have the following Shared_folder with the following permissions:

Code:
drwxr-xr-x 2 nobody users 4096 Dec 27 00:24 Shared_folder
..and the following Samba config:

Code:
[Shared_folder]
    printable = no
    writeable = yes
    path = /home/Shared_folder
    force group = users
    comment = Common Documenets accessible by all users
    valid users = @users
    create mode = 757
    public = no
    directory mode = 777
But it when I try to map the drive in windows im unable to pass the user validation part as it keeps failing. I have restarted the Samba server but still no difference.

Could someone please shed some light as to how to get this working. Any help would be greatly appreciated.

Thanks in advance.
 
Old 12-26-2012, 10:10 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
When you add the users with useradd, add the "-G users" argument to make the users members of the "users" group.

After editing smb.conf, run testparm to check for errors.

Check the logs in /var/log/samba/. Some hard to debug errors may be found there such as SELinux or AppArmor restrictions.

I think the force group will force the group for file creation and access, but not for authentication. If only members of @users are allowed access, using "force group" is redundant.

Also look at group passwords. I've never used them. Normally a user will authenticate with their own password and @users is used for access control. You may need to research and experiment to get it working as you want.

Post the global section of smb.conf. We can't tell what security model you are using.

Last edited by jschiwal; 12-26-2012 at 10:30 PM.
 
Old 12-27-2012, 01:32 PM   #3
atiqjaved
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Code:
[global]
	log file = /var/log/samba/samba.log
	guest account = nobody
	add group script = /usr/sbin/groupadd '%g'
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	socket options = TCP_NODELAY
	delete group script = /usr/sbin/groupdel '%g'
	obey pam restrictions = yes
	admin users = root
	add user to group script = /usr/sbin/usermod -G '%g' '%u'
	null passwords = yes
	encrypt passwords = yes
	passwd program = /usr/bin/passwd %u
	passdb backend = tdbsam
	wins support = true
	dns proxy = no
	netbios name = FILESERVER
	server string = TurnKey FileServer
	unix password sync = yes
	workgroup = MIRAJ
	os level = 20
	add user script = /usr/sbin/useradd -m '%u' -g users -G users
	syslog = 0
	security = share
	panic action = /usr/share/samba/panic-action %d
	max log size = 1000
	delete user script = /usr/sbin/userdel -r '%u'
	pam password change = yes








[homes]
	browseable = no
	comment = Home Directory
	writeable = yes
	valid users = %S,atiq

[cdrom]
    comment = CD-ROM
    read only = yes
    locking = no
    guest ok = yes
    path = /media/cdrom
    preexec = /bin/mount /media/cdrom
    postexec = /bin/umount /media/cdrom

[storage]
    comment = Public Share
    path = /srv/storage
    browseable = yes
    read only = no
    create mask = 0644
    directory mask = 0755


[Shared_folder]
	printable = no
	writeable = yes
	path = /home/Shared_folder
	force group = users
	comment = Common Documenets accessible by all users
	valid users = @users
	create mode = 757
	public = no
	directory mode = 777

[PUBLIC]
	comment = Public Folder
	writeable = yes
	guest only = yes
	public = yes
	path = /home/public
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
unable to map windows domain using samba back2preeti Linux - Server 5 03-06-2012 01:06 AM
Unable to access fedora 10 shared folder from windows nightmare49 Linux - Software 2 08-17-2009 07:41 AM
Windows machine can not see my samba shared folder. mtlhd Linux - Server 13 05-09-2009 10:01 PM
how do i connect to a windows shared folder using samba? winstone5000 Linux - Networking 1 12-19-2005 11:38 AM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration