Hi Terry,

> Unfortunately, I still can't make the fstab entry work.

The error message is unchanged?

> As mentioned before the path to the main backup is:
>
> smb://[email protected]/TerryJColes/Backups/Optiplex/Duplicity/OptiPlex/
>
> What should the fstab entry be to allow me to mount that folder?
> I have created a local credentials file in etc.

The fstab entry is not needed as the detail may be given to mount(8)
instead; creating the entry just creates a short-cut which lessens the
arguments given to mount if you're going to do it often.

I don't use SMB/CIFS.  I suggest, like with Graeme the other week,
stripping everything back to just a single command without relying on
/etc/fstab or a credentials file.  Then you can keep editing that one
command with the results interleaved in the terminal.  Else you can't
track what was in what file when the command was run to learn over time.

Store the password in a shell variable in the one terminal window which
will be used for all these commands:

    read password

For example:

    $ read password
    letmein
    $

Define more shell variables.

    remote=//readynas.local/TerryJColes/Backups/Optiplex/Duplicity/OptiPlex
    local=/mnt/Optiplex_Backups

    uid=`id -u`
    gid=`id -g`

    option=ro   # Read-only
    option+=,username=TerryJColes,password="$password"
    option+=,iocharset=utf8,uid=$uid,gid=$gid
    printf '%s\n' "$option"   # Eyeball.

Attempt the mount:

    sudo -i mount -m -t cifs "$remote" "$local" -o "$option"

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2026-10-06 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
  New thread, don't hijack:  mailto:[email protected]

Reply via email to