Click to See Complete Forum and Search --> : Samba - Valid user and a folder becomes browsable...


elfking
09-06-2002, 08:46 PM
Hey there all, I have setup a machine with samba etc. im trying to figure out the command I need in smb.conf to make it so when one user logs on they see, say folder "Art" for the art user... and when "Programmer" logs in they see folder "programmer stuff" under the PDC/machine i have set up. I don't want "Art" user to see "Programmer" 's folder and vise versa... Im pretty sure its something easy but... im a noobie here. I'll put my smb.conf below incase i made a mistake of course. =D Thanks all

-------------------------------------

# My fantastic smb.conf file.

[global]
...
add user script = /usr/sbin/useradd -d /dev/null -g machines -s /bin/false -M %u
...

workgroup = linuxrealm
netbios name = Chrono
server string = Samba PDC %v
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
os level = 64
preferred master = yes
local master = yes
domain master = yes
security = user
encrypt passwords = yes
domain logons = yes
log file = /var/log/samba/log.%m
log level = 2
max log size = 50
hosts allow = 192.168.1.


#Below is for roaming profiles.
# logon home = \\%l\%U\.profile
# logon drive = H:
# logon path = \\%L\profiles\%U

# *** Below script will execute every time someone logs onto the PDC
# logon script = netlogon.bat

#Shares (Linux to Windows)

# *** Need to uncommment below for logon script to work.
# [netlogon]
# path = /home/netlogon
# read only = yes
# write list = @admin

[homes]
comment = %u 's Home Directory
browseable = no
writeable = yes

[profiles]
path = /home/samba/profiles
writeable = yes
browsable = no
create mask = 0600
directory mask = 0700
public = no

[Public Folder]
path = /home/stuff
writeable = true
comment = This is a folder that everyone on the domain can see and play
with.

[art files]
path = /home/art
writeable = true
browsable = no
valid user = @artists
comment = This is a folder that only artists can see.

[programmers only]
path = /home/progstuff
writeable = true
browsable = no
valid user = @programmers
comment = This is a folder that only programmers can see.

elfking
09-07-2002, 08:42 PM
Maybe its not possible... which doesn't make much sense to me, then again im not a programmer. Im just trying to get something togeather to show that linux could replace novel with permissions and that way we don't have to incorperate all that propriatary software in ontop of the already crashing windows os =D

As I said... Art user should be able to see/access Art folder...
Programmer user shouldn't be able to see aft folder or access it....
Art user shouldn't be able to see the programmer folder... so almost like the "homes directory" but it should be based on a group so i can say @artists can see art folder.. and not the programmers folder... and @programmers group can see programmer folder..... hope that cleared things up and maybe helped better explain my problem.

michaelk
09-07-2002, 10:26 PM
I haven't found anything in the samba documentation that can change a share parameter like you desire. If you had that share automatically connect on logon then it would be accessible with windows explorer instead of network neighboorhood. With roaming profiles or a logon batch file I think this would ba an easy workaround.

elfking
09-08-2002, 12:08 AM
Alright, that would work for now. Any idea on where the info would be to do that? You are right that would be a great workaround for the time being. Thanks for the help.

AndrewBeaton
09-09-2002, 07:10 AM
Hiya,

That is possible if you want user Art to login and only see /folder/art and user Programmer to see /folder/programmer.

I use this setup for my home network where user mp3 accesses that folder and so on.

I'm at work at the moment, but I will paste a copy of my smb.conf file for you tomorrow if that will help.



Regards,

Andrew Beaton

elfking
09-09-2002, 01:01 PM
Yeah that should work. It would be great if you could get me that info, Thanks. =)

jumpedintothefire
09-09-2002, 05:21 PM
I haven't play around with this yet, but "programmers & artists" *I think* need to be a linux group with the users added to them..

I could be mistaken, thou.....

elfking
09-09-2002, 05:31 PM
Yes, they do need to be groups, sorry i didnt say so earlier, but i did set up those groups