Answer to Question #229763 in Computer Networks for Ahsan wains

Question #229763

Configure a system to allow files to be shared amongst Linux computers. Create three shares: one called Cheese that is read-only and restricted to the 192.168.1.0/24 network, one called Pickle with read-write access, that permits root privileges and can only be accessed from 192.168.1.1 and one called Crackers that is accessible to 192.168.1.1/24 to 192.168.1.10/24 as read-write and everyone else as read-only. Ensure that all of these files are shared across an array of 2 disks for reliability. Where additional data may be needed to complete this task, generate this using your own judgment.

I want a script in ubuntu

In that script, I need to configure and set up share and set up privileges


1
Expert's answer
2021-08-26T04:00:24-0400
The steps to share a file among three machine are given below:

dnf install samba


The configuration file for the samba (/etc/samba/smb.conf)

[global]

        workgroup = SAMBA

        server string = %h server (Samba %v)

        invalid users = root

        security = user

[homes]

        comment = Home Directories

        browseable = no

        valid users = %S

        writable = yes

setsebool -P samba_enable_home_dirs on
getsebool samba_enable_home_dirs
smbpasswd -a <your-user>
pdbedit -L -v
smbpasswd -x <user-name>
systemctl start smb
systemctl enable smb
firewall-cmd --add-service=samba --permanent
mkdir ~/WindowsShare
sudo mount.cifs //<address-of-windows-pc>/MySharedFolder ~/WindowsShare/ -o user=<Windows-user>,uid=$UID
sudo umount ~/WindowsShare/

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS