1

I want to share a folder from 14.04.01 to a windows network. Not a problem so far.

I want to share my folders video and pictures for everyone. public but read only. I want to share a folder admin, hidden + secured with authentication and rw.

This is my attempt to solve my problem.

[global]
workgroup = XXX
follow symlinks = yes
wide links = on
unix extensions = no
guest account = foo
security = user
map to guest = Bad Password
public = yes
writable = no
interfaces = lo eth0
bind interfaces only = true

[Admin]
path = /foo/bar/my_share
guest ok = no
public = no     
writable = yes  
browseable = no 

[Video]
path = /foo/bar/my_videos

[Picutres]
path = /foo/bar/my_pictures

This is working for the public r/o folders.
The admin folder is not accesible from windows computers when the windows user name != the allowed smb account.

Means:

Windows Account: Bar; SMB Account: Bar => working / no auth at all
Windows Account: Foo; SMB Account: Bar => not working at all

So my question is: How to configure SMB to allow user/pass authentication from windows without an AD?

Note: I'm using the server version - I only have SSH access to configure samba

2 Answers 2

1

Maybe the following will help: this is the config I use for three different shares with access rights as follows:

  • [ze] is accessible to any user (read and write)
  • [Valves] is readable by anyone, writeable only by users belonging to group 'Bureau'
  • [Bureau] is readable/writeable (not hidden) only by users belonging to unix group 'Bureau'.

Note that using these settings, files are created by the user under his name but belonging to group 'Bureau' (enforced by force group). Besides, all file (and directories) receive a RWX group setting (force create mode + force directory mode). I guess adding browseable = no will hide the desired share.

It is then up to you to define the list of users belonging to the desired group (or to change the write list). Last but not least, you will have to define the users in the unix system and in samba (smbpasswd)

[ze]
comment = Public share
path = /partages/ze
public = yes
writeable = yes
force create mode = 777
force directory mode = 777

[Valves]
comment = Read by everybody / write by '@bureau'
path = /partages/valves
public = yes
write list = @bureau
force create mode = 770
force directory mode = 770
force group = bureau

[Bureau]
comment = read / write only to users in the group 'bureau'
path = /partages/bureau
writeable = yes
write list = @bureau
force create mode = 770
force directory mode = 770
force group = bureau
valid users = @bureau

`

0

Simple.

Install Samba from the software center. If you can't get Samba to show up in the application menu or search, do the following:

Fix For Ubuntu 14.04 .. Make sure Samba is not installed(so uninstall if needed). Then open terminal & type "sudo apt-get install gksu" (Without The Quotes). Then type gksu-properties In the dialogue that follows set authentication mode to "sudo" and grab mode to "enable" Now Install Samba everything should be working & it show up on Unity Bar & Search.

Open Samba

Click 'Preferences'

Select 'Samba Users'

Create User's and Passwords.

Create share using the plus sign and grant the appropriate permission for each user you created.

That's it in a nutshell.

2
  • Well sorry. This is my fault. I'm using the server version - terminal only.
    – Brettetete
    Nov 16, 2014 at 0:41
  • Good to know, makes a big difference. Nov 16, 2014 at 0:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .