Re: Problem mounting Samba Share in fstab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i have several users using the same machine.

what i did is a regular mount by a small shell-script. I am still rookie, so my target (and it must be easy) will be,
that this shell script:

Advantage:
-> Starts automatic while LOGGING in - this is easily done in gnome, where you can define autostarters
-> checks, whether there is networking or not, as i don't like error-messages on boot-up-time (not yet done, to less
time to learn shell-scripting a little bit more...)
-> is usable for all users, more flexible than fstab
-> is a kind of windows-netlogon ;-)

Disadvantage:
-> needs an per-user-entry for the mount command in sudoers-file (can i make life easier?)
-> needs a further shell-script for the logout.
-> needs the same folder-structure in your homedirectory

/usr/bin/samba_login.sh:
sudo mount -t cifs -o credentials=/$HOME/.smb,rw,uid=$UID,gid=$GID //server/$USER /home/$USER/sambahome
sudo mount -t cifs -o credentials=/$HOME/.smb,rw,uid=$UID,gid=$GID //server/share /home/$USER/sambapublic

/usr/bin/samba_logout.sh
sudo umount /home/$USER/sambahome
sudo umount /home/$USER/sambapublic

..and in each /home/$USER/ a credentials-file (chmod 600) called .smb (or whatever you call it in your login.sh
.smb:
username=[user]
password=[password]

for the beginning it's a little bit more work, but for me and my several users, its a gain of flexibility.

Roger


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux