How to have my Samba share show in file directory

Sorry for being confusing.

Please provide the output to:

echo $USER
groups

and also provide the full mount command you’re using (not the mount --all command but the full mount command you used from here before you added it to the fstab file…)

:blush:

P.S. also provide the same output from the computer that is running the Samba share when logged in there…
P.P.S.
:bed: :zzz: :wave:

echo $User on computer:
james
groups output on computer:
sys network power sambashare lp wheel autologin james

Server user output:
jamess7995
groups:
jamess7995 adm cdrom sudo dip plugdev lxd

Mount command that you would use in terminal before configuring fstab:

mount -t cifs //192.168.50.112/home /home/james/home -o  username=sora,password=123456,domain=leviathan

, which outputs ““mount: only root can use “–options” option””, using sudo resolves that and it just works at that point

Ah, you’re logging on under different user names and uids on both client and server.

Try:

  mount -t cifs //192.168.50.112/home -o rw,username=sora,password=123456,domain=leviathan,vers=3.0  /home/james/home 

if that doesn’t work, what is the version number of the Samba running on the server?

Also, I’d make the server and client UIDs the same and use james instead of sora , but that’s just an opinion, not a technical necessity.

:innocent:

Still get “mount: only root can use “–options” option”
from server:

Version 4.7.6-Ubuntu```

Yeah, add sudo, sorry!!!

That should work. what’s your samba config file on the server?

:thinking:

Okay, but the whole issue seems to be that only root / sudo can do it, so even if I run sudo, I’m going to get the same issue with fstab since that’s the same logic?

Nope. fstab always runs as root.
The mount command we’re testing is just to ensure we get the fstab correct before modifying it…

:innocent:

Okay, so just like before, the command works only with sudo, not sure why we did that but what’s next.

If

mount -t cifs //192.168.50.112/home /home/james/home -o  username=sora,password=123456,domain=leviathan

worked, you should add at the end of fstab:

//192.168.50.112/home /home/james/home		cifs	noauto,x-systemd.automount,x-systemd.device-timeout=10,rw,username=sora,password=123456,domain=leviathan 0 0

and then type

sudo mount --all
  • if that gives an error, add a # as a first character¹ to the line you just added and report back the exact error.
  • If you get no error: No news is good news and you should reboot and see if the share now becomes available in /home/james/home automatically.
  • If it didn’t come up automatically, please report back as well.

If it does all work, that’s what the Solution button is for!!

:grin:

Note 1 the # will make that line a comment, so not do anything with it any more…

1 Like

so running that, does not give me write permission, where as before, I wanna emphasize, just to be sure, the commands were working, and their respective recommended fstab command were not working, unless I ran sudo mount -a

sudo mount -a is the same as sudo mount --all is the same as fstab.

So if you’re telling me:

  • if the share does not get mounted in fstab, the network might not be available when you mount
  • mount --all gives you write permissions but fstab does not?

Please clarify what the remaining issue is?

:thinking:

sorry for the long hiatus, I encountered a new read and write issue, that was entirely irrelevant but I thought I messed something up, so where I’m at, if I run an individual command, I can get it to mount the samba share, if I add a command to fstab, I have to use sudo mount -a, I can’t just use mount --a, which isn’t a big deal. the only problem is that fstab requires sudo, which means I can’t get it to happen at startup

fstab does not contain the mount command anywhere, so this:

is by design… :wink:

fstab runs as root at startup so I don’t understand what you’re trying to say.

Here is more information on fstab

:+1:

This was mentioned previously:

in “options”, I add nofail,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev if server not run when i open my manjaro ( and wiki )
by @papajoke

I am interested in the ,_netdev portion as well as others and wonder if it helps with an FSTAB mounting of a NAS drive.

I note that the last that @Fabby mentioned did not have these. **Also that no reply came back.

I hate to revive this old thread but it was helpful to me so this further may be of help to others less acquainted with Linux / Manjaro.

My particular issue, even though with configs and add-ons or options to the Dolphin File Manager, I can “see” the network drive… Is that on Open and Save dialogs form many apps, I get a very limited list of locations to access, and when I try to get to one of the NAS locations I often see “ONLY LOCAL PLACES” type of errors. This to a noob is very problematic and leads to the idea that Linux is less than it is. <= My very humble opinion since I still struggle with the differences.

[EDIT] Adding here the last suggested FSTAB entry, as Fabby listed:
//192.168.50.112/home /home/james/home cifs uid=1001, username=MY_USERNAME,password=MY_PASSWORD,domain=WORKGROUP,file_mode=0777,dir_mode=0777 0 0

1 Like