UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
IŽll try to be as clear as possible with the explanation.
I'm an ICT teacher using both Windows and Linux on the same network.
At work we have a file server called servidor (running Ubuntu) with two folders: publica (pass 1234) and material (pass=xxxx).
This folders are shared through samba to windows computers. Now I am installing new Linux computers in this network. One of them with Lubuntu 17.10 and three more with Ubuntu 16.04LTS.
What I want to do is to access those folders from Lubuntu computer and mount them at boot time to have them on the desktop.
What I tried to do is this:
1) sudo apt install cifs-utils
2) sudo mkdir /mnt/publica and sudo mkdir /mnt/material
3) IŽve edited fstab (sudo nano /etc/fstab) and added this two lines at the end of fstab: //servidor/publica/mnt/samba cifs username=alumnos,password=1234 0 0
and //servidor/material/mnt/samba cifs username=profes,password=xxxx 0 0
4) I saved fstab and restarted the computer but it didn't work: Folders are not mounted and /mnt/publica and /mnt/material are both empty.
It appears you're missing the space between the "device" (the URI of the share) and the "mount point" (the directory on the local server. You've also used "samba" as subdirectory of /mnt but say you created publica and material. So it should be:
By the way - you don't have to reboot to test whether they mount. Typing "mount /mnt/publica" should read your fstab entry to mount that and "mount /mnt/material" would do the same for the other mount. "mount -a" says to mount everything in fstab so would mount both. It doesn't do anything to filesystems that are already mounted so is a quick way to test updates to fstab.
Last edited by MensaWater; 04-11-2018 at 03:46 PM.
Thanks MensaWater for your help! It worked. Instead of using servidor I've used the IP (192.168.1.200). With servidor it didn't work but with the ip yes! :-)
The problem I am facing now is how to give the folders right to be written and read: publica should be readable and writable by all users (alumnos and profesores) and material only RW by profesores and only readable for alumnos. Is this clear? :-)
If you run "man mount.cifs" you see other options you can add including for user ID, group ID and permissions. You'd setup using those options in tandem with setup of users in /etc/password and group assignments in /group.
If you want a specific user to own the cifs mount you'd use its uid in options. If you want members of group to have access you use that groups gid in options. You'd set permissions in options appropriate to the level of access you want the user and group to have.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.