Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

Username option while mounting Windows share without sudo /Ubuntu 22.04 server

$
0
0

If I try to mount Windows network share it uses actual Ubuntu user instead of given username.

mount -t cifs -o vers=3.0.2 -o username=Windows_username //share /mnt/smbPassword for Ubuntu_username@//share:

If I do it with sudo it correctly uses specified username option

sudo mount -t cifs -o vers=3.0.2 -o username=Windows_username //share /mnt/smbPassword for Windows_username@//share:

Before trying this I put line to /etc/fstab

//share /mnt/smb cifs noauto,user 0 0

Same result if I use credentials option with credentials file.

I want to mount share with Ubuntu user (use it in script), that doesn't have sudo privileges. I need to login to Windows share with Windows user, that has set privileges on that share.

Why regular Ubuntu user cannot use username option?


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>