Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to setup a Samba share for file sharing in my intranet.

  1. Is there any way to prohibit some kinds of files (e.g *.exe) from being uploaded to the share folder?

  2. How can I force the user to change their password when logging in for the first time?

share|improve this question
1  
Yes it is possible. I do not have full answer but hint is use veto files option in your configuration file for your first query, which will hide the specified files. Hint for second query is to use pdedit utility. –  Sachin Divekar Nov 26 '11 at 14:30
add comment

1 Answer

I found a great tutorial on this from RedHatLinux.

CONFIGURE SAMBA SERVER

Step 1.mkdir /samba
Step 2.chmod a+w /samba
Step 3.yum install samba -y
Step 4.vim /etc/samba/smb.conf
    [public]
        comment = Only users
        path = /samba
        public = yes
        browseable=yes
        writable = yes
        printable = no
        write list = +staff
Step 5.service smb restart

OPTIONS THAT CAN BE GIVEN IN FILE

Step 1.If browseable=yes ->we CAN see the shared dir
  If browseable=no -> we CANNOT see the shared dir
Step 2.If public=yes    ->Allows anonymous Login
  If public=no     ->Stops  anonymous Login
Step 3.writable = no     ->uploading is denied  for BOTH the users.
   writable = yes    ->uploading is allowed for BOTH the users
Step 4
     a. writable =no +   ->Allows only u1 to upload files, but
     b. write list =u1   both writable=no and writelist=u1 shuld b enabled
Step 5.hosts allow=127. 192.168.0.20 ->Allow only 192.168.0.20 ip to access share, other ips are denied

CLIENT COMMANDS

Step 1.smbclient -L //192.168.0.48/share  ->List directories shared
Step 2. smbclient //192.168.0.48/share   ->Anonymous Login
   get <file>
   put <file>     
Step 3a. To generat passwd to allow for non-anonymous login
      1. smbpasswd -a u1
      2. service smb restart 
Step 3b. smbclient //192.168.0.48/share -U u1  ->Non Anonymous Login
    get <file>
    put <file>
share|improve this answer
    
looks useful,I will take a look and thanks a lot –  husean Nov 28 '11 at 4:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.