Good evening, Mint friends,
I have following plan, do you agree or what should I change ?
I have :
* One Synology NAS with shares exposed via WebDavS, NFS and Apple Talk, e.g. "media" and "docs".
* Two Linux notebooks
* Four users with individual accounts on the linux mashines and on the NAS.
The idea:
when user1@linux logs into MINT. the share "media" is automatically mounted on ~/pictures/NASmedia, using the user1@NAS credentials.
when user2@linux logs into MINT. the share "media" is automatically mounted on ~/pictures/NASmedia, using the user2@NAS credentials.
My plan:
For each user
1) create mountpoints ~/pictures/NASmedia and ~/documents/NASdocs
2) create bash script to mount shares using credentials for user
a) granting "sudo mount" to users & calling "mount" command
b) using FUSE
3) execute bash script each login
Is there an easier way to achieve this?
Could I exchange password authentication for certificates or something? (Storing passwords hardcoded is not nice)
THanks in advance, Josh
How do I set up my network shares
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How do I set up my network shares
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Use the rigth tools right ;-)
Re: How do I set up my network shares
NFS mounts (and, frankly remote shares in general) under Linux / Unix tend to work differently than you're probably used to with other systems.
A quick ddg search indicates that a Synology NAS SHOULD implement things in a manner that would allow a more straightforward approach:
NOTE2 -- I'm only referencing "User1" and "User2", you can repeat this for as many users are are necessary
A quick ddg search indicates that a Synology NAS SHOULD implement things in a manner that would allow a more straightforward approach:
- On the NFS Server, create directories owned by the proper UIDs & GIDs, with correct permissions
- Set up the mount point in the /etc/fstab to auto-connect to the share when the machine is booted
- Symlink from the relevant user (1 or 2) to their specific directories as you mentioned (pics, docs, etc.)
- If anything is truly shared between U1 and U2, make sure they're part of an extra "nfsshare" or something group, which in turn has write access to their common directory.
- Repeat the exact same process on the other machine.
Code: Select all
Synology:/srv/shared #accessible, in read-only fashion to all
... /User1 # "User1" directory and all subdirs only accessible to UID=1000
.../Documents
.../Pictures
.../whatever
.../User2 #"User2" directory and all subdirs only accessible to UID=1001
.../Documents
.../Pictures
.../whatever
../CommonShare #"Common" directory (and all subdirs) accessible to GID=990 "nfsusers"