Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-19-2007, 09:14 PM   #1
LQ Newbie
Registered: Dec 2007
Posts: 1

Rep: Reputation: 0
Samba Share for Group

How do i set up a Samba share so that only a specified group has full access OR specify specific users to have access? Terminal instruction please.
Old 12-19-2007, 09:23 PM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
valid users =

Terminal instructions

Open box.
Take Terminal out
Put on desk
Plug in

It's not a help desk

Read man smb.conf
Old 12-19-2007, 10:47 PM   #3
LQ Newbie
Registered: Nov 2007
Location: localhost
Distribution: Slackware
Posts: 21

Rep: Reputation: 15
File Permissions

Sorry if its a little superfluous, but i got excited...

Ok, what you are wanting to change is file permissions. I will try to explain them a little, but a quick google will show up more information.

so: every file has three three-bit "octets" that assign privileges.
  xxx     xxx     xxx
 owner   group   world
You may have noticed something like a '-rwxrwxr-x' or such when you do any 'ls -l'.

So, what do those things mean?

Using the commands "chmod" and "chown" you can change the owner and the file permissions for a given file.

first off, say you want to change the owner to bob:
chown bob given_file
note: you must have sufficient privileges to change the properties of the file...

ok so now your file is owned by bob. however, say you want it to be able to be read by everyone in the "family" group? well, go on then.
chown .family given_file
now the file is owned by the family group. (notice the leading '.' that denotes the group. you can also do user and group at once, like:

Just because you have changed the ownership of a file doesnt mean that the people that own it can automatically read it. thats where those 9 bits at the top come into play. I will try to exlain 'chmod' now:

Each of those three three-bit octets can be represented by 0's and 1's. the easiest way to do file permissions is to represent it in binary form. to do so, do this:

Situation: change the group permissions to allow read and execute, but not write. owner has full priv's, and world has read only.

ok, now think about it like this:
  rwx    r-x    r--
 owner  group  world
  111    101    100
 owner  group  world
ok now if you know binary, add the three together, separately.
  421    421    421
  111    101    100
 4+2+1   4+1     4
   7      5      4
so now all you gotta do is:
chmod 754 given_file
and your file has the right permissions.


Okay, now to answer your question fully.

you kinda asked the same question twice. what you should do is create a new group, like so:
groupadd name
Now that you have the group, add people to the group, like so:
useradd -G group_name user_name
then all you have to do is change the file permissions of the samba share files.

Last edited by neophytezer0; 12-19-2007 at 10:50 PM. Reason: code tags...


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
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
show the samba share but can't mount the share badall Linux - Server 3 05-30-2007 04:24 AM
searching samba share breaks connection to share Elomis Linux - Server 1 05-11-2007 12:28 AM
Samba on FC5 won't let me use group share bskrakes Linux - Software 9 12-09-2006 12:10 PM
Simple Samba Setup, Share & Not Share timmywo Linux - Software 4 07-30-2004 07:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration