LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Samba User Security Question (https://www.linuxquestions.org/questions/linux-security-4/samba-user-security-question-521737/)

katoom187 01-22-2007 11:33 AM

Samba User Security Question
 
Greetings, all.

I'm setting up a file server for use on a mostly windows network. It's for a fairly small number of trusted users, so I'd like to just set up one samba user with read only access for them to use. I'm trying to avoid letting them have any other access to the machine whether via local login, ssh, etc.

Does anybody know of some way to either create a user account and deny login access other than to shared folders or create an account that only exists for Samba?

Thanks

shads2k5 01-25-2007 06:40 AM

Hi
 
Hi ,

As what i understand from ur question is you may require to set
a SAMBA Server , and you have to share the files which need to be accessed from the other windows machine.

Ans as fas as the security is cocerned you cansecure the access using the samba configruation itself , also you can create a samba account so no other account will be able to access your secret filse :)

Hope this has given you an idea.... what you really want to do .

thanks...

jschiwal 01-25-2007 06:46 AM

The "Samba 3 by Example" book has an example of a document server. That seems to match what you want to do. I think that they used the "Force User" and "Force Group" options in that shares config stanza. You can download the book from the Samba.org website.

Micro420 01-25-2007 11:15 AM

on LInux machine:

Code:

#useradd sambausername
smbpasswd -a sambauserusername
(enter password)
(verify password)

mkdir /home/sambashare (or whatever path you want)
chown 770 sambashare

vi /etc/samba/smb.conf

In your smb.conf:

[sharename]
comment = share drive for Windows user
path = /home/sambashare
valid users = sambausername
security = users
browseable = yes
writable = no
allow hosts = 192.168.1.2, 192.168.1.3, 192.168.4, etc...

(exit vi or your editor)
(restart your samba service)

Now onto the Windows machine:
Code:

START->RUN
cmd
net use z: \\ipaddressofsambamachine\sharename /user:sambauser
(enter password)

Now they have a Z: drive and can READ ONLY.

This account, sambauser, will not be able to log into the Linux system at all since is is passwordless, and by default Linux will not login people with passwordless Linux accounts.

katoom187 01-25-2007 11:41 AM

Gread advice
 
Thanks for all of the great advice, guys. I'll do some working with this and let everyone know how it comes out.

Thanks

katoom187 01-25-2007 01:07 PM

Worked great Micro, just what I wanted.


All times are GMT -5. The time now is 10:47 AM.