LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 12-19-2007, 09:14 PM   #1
bgeorge
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
billymayday
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
etc.

It's not a help desk

Read man smb.conf
 
Old 12-19-2007, 10:47 PM   #3
neophytezer0
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.
Code:
  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:
Code:
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.
Code:
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: bob.family)

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:
Code:
  rwx    r-x    r--
 owner  group  world
or
Code:
  111    101    100
 owner  group  world
ok now if you know binary, add the three together, separately.
Code:
  421    421    421
  111    101    100
 ==================
 4+2+1   4+1     4
 ==================
   7      5      4
so now all you gotta do is:
Code:
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:
Code:
groupadd name
Now that you have the group, add people to the group, like so:
Code:
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...
 
  


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
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


All times are GMT -5. The time now is 06:58 AM.

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