Score:0

CLI command works OK but same entry in/etc/fstab fails. Can anyone offer any assistance?

cn flag

Ubuntu 20.04 on Dell Inspiron 3580. The CLI command

sudo mount -t cifs //192.168.1.67/ /media/NAS/storage -o username=Gord,password=Tpocpmoc99,uid=gord,file_mode=0644,dir_mode=0755,vers=1.0,nounix

works OK.

But this entry in /etc/fstab

//192.168.1.70/Backup /media/NAS/storage -o cifs username=Gord,password=Tpocpmoc99,uid=gord,file_mode=0644,dir_mode=0755,vers=1.0,nounix

fails to mount the selected drive. Any info is appreciated.

ru flag
You do know the fstab entry and the command you're running are different, yes? One defines a direct share location, the other doesn't. Check the syslog for why the fstab mount fails.
GordK avatar
cn flag
Thanks Thomas. Yeah...I do know they are different. The fstab entry is modelled after another fstab entry found on AskUbuntu on StackExchange site. I must be close with my entry but success is elusive.
Score:1
hr flag

The filesystem type and options in /etc/fstab are identified by their field positions, rather than using switches like -o (or -t which you seem to have lost). So:

//192.168.1.70/Backup /media/NAS/storage cifs username=Gord,password=Tpocpmoc99,uid=gord,file_mode=0644,dir_mode=0755,vers=1.0,nounix
GordK avatar
cn flag
Thanks steeldriver. That modification brings me back to the selected mounts being visible in 'files' but I am presented with the message."mount:/media/NAS/share:operation permitted for root only". I will rely on the manual cli commands until I master this small miscue in my fstab entries. Thanks for your time. It is appreciated. GordK
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.