Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
I guess sudo service samba stop would have been too obvious. So, they chose something less intuitive. Wouldn't want to make things too logical or easy.
In the beginning of time there was the smbd daemon and the nmbd daemon. Some smart folks over at RedHat decided to combine the two into one "service" called "samba" since System Administrators tend to run both in sequence. In Debian it's still that way.
In Ubuntu ( I think because of upstart - not sure ) they went back to the olden days where your run smbd and nmbd separately.
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Morbius1
In the beginning of time there was the smbd daemon and the nmbd daemon. Some smart folks over at RedHat decided to combine the two into one "service" called "samba" since System Administrators tend to run both in sequence. In Debian it's still that way.
In Ubuntu ( I think because of upstart - not sure ) they went back to the olden days where your run smbd and nmbd separately.
That explanation should help the memory. I will still need to remember to desiccate the word samba of her vowels to the word smb. Linux bash seems to hate vowels. Must have to do with some voweless clicking language in StarTrec.
Re: HOWTO: Setup Samba peer-to-peer with Windows
How can I made a folder accessible only for a group of users?
Re: HOWTO: Setup Samba peer-to-peer with Windows
How about this:
[1] Create a unique group:
Code:
sudo groupadd newgroup
[2] Add your users to that group
Code:
sudo gpasswd -a user1 newgroup
[3] Make the share look something like this:
[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
valid users = @newgroup
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
Logout and login again for the group changes to take affect and then restart samba:
Code:
sudo service smbd restart
Re: HOWTO: Setup Samba peer-to-peer with Windows
Re: HOWTO: Setup Samba peer-to-peer with Windows
I read through the original HowTo again and realized he never altered the Linux permissions on the shared directory itself so my step [3] won't work.
To keep with the authors original intent I have modified my step [3] to this:
[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
valid users = @newgroup
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
"valid users" will restrict who can get in to the "newgroup" users.
"force user" will force the user to you so everyone in the newgroup group will be able to read and write.
Sorry about the confusion.
Re: HOWTO: Setup Samba peer-to-peer with Windows
I created two usergroups in my local sys, and rightnow I want that one group can access one dir, and other one another.
named: alfa and beta
my conf looks like (they are the same)
[Alfa]
path = /home/samba/alfa/
browseable = yes
read only = no
guest ok = no
valid users = @alfa
force group = alfa
create mask = 0664
directory mask = 0775
and I don't even know what is the @newgroup
Re: HOWTO: Setup Samba peer-to-peer with Windows
The newgroup is just an example.
[Alfa]
path = /home/samba/alfa/
browseable = yes
read only = no
guest ok = no
valid users = @alfa
force group = alfa
create mask = 0664
directory mask = 0775
You did it right as long as you added the users to that group ( step [2] ). The only problem and the reason for my correction to step [3] is that your definition is fine if it were a pure Server. All remote users can add a file to the share and it will save as:
user = remote-user-name
group = alfa
permissions = 664 / 775
So all other remote users can read / write to each file.
But if this is a a desktop computer with a user named say ... morbius his add to the share locally will save as:
user = morbius
group = morbius
permissions = 644 / 755
The remote user can read but not write to morbius' files. So to follow the original HowTo use the "force user" to make all remote users appear to be you after they are authenticated.
Re: HOWTO: Setup Samba peer-to-peer with Windows
Mine one is a local server (Natty x64). I think I am getting into your explaination.
My final goal is to get department folders on the local server accessible only to the department group.
If you have any other suggestion to get it working, I would very appreciate it!
Re: HOWTO: Setup Samba peer-to-peer with Windows
Quote:
Originally Posted by
Korsakoff
Mine one is a local server (Natty x64). I think I am getting into your explaination.
My final goal is to get department folders on the local server accessible only to the department group.
If you have any other suggestion to get it working, I would very appreciate it!
Create multiple shares by department and create multiple groups by department and use your [alpha] share definition as a template.