You are not logged in.

#1 2016-10-18 18:16:18

step
Member
Registered: 2016-05-09
Posts: 56

I want that mount samba, with entry in fstab, ask me password

Hi all, i have an unsolved problem.
I whish that when i try to mount my samba server asks my or root password.

I added the following line to / etc / fstab:

//my.server.ip/shared.folder  /path/to/mount    cifs    credentials=/home/.credentials,user,noauto,uid=1000,rw        0 0

It mount correctly but he don't ask me to write password, like when I mount partition when i keep Windows.

I try to explain better with this image: Image

I hope you can help me! Thank you in advance!

Offline

#2 2016-10-18 19:20:59

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

consult "man mount" on what the "user" key in the mount option does.

Offline

#3 2016-10-19 07:58:04

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

consult "man mount" on what the "user" key in the mount option does.

I think you mean to change "user" with "no user" but if I do it says permission denied, no one can ask me or my root password (which belongs to the group sudo). I hope that you could help me to solve this problem! Thanks in advance.

Offline

#4 2016-10-19 08:01:01

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

That's a matter of the tool you try to use to mount such partitions (ie. likely the file browser of your choice?) which would be?

Offline

#5 2016-10-19 13:23:26

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: I want that mount samba, with entry in fstab, ask me password

Step, for clarity :

you WANT arch to give you a password prompt before it mounts the shared folder ?

If so,why are you using a .credentials file ?

Last edited by Lone_Wolf (2016-10-19 13:25:55)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2016-10-19 13:47:18

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

Afaiu, he doesn't want to be challenged for smb authentication, but for local mounting ("ask for root or user password"). That means to strip the user option and have a (GUI, I assume) tool that calls for privs instead of surrendering. smb would be a red herring then.

Offline

#7 2016-10-19 14:49:20

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

Exactly, that's what I mean; because if I try to do as to say Lone_Wolf asks me the password from the terminal; but I want to be shown me a window for entering the password at this point is fine well what I have included in .smbcredentials (for instance that of the server).
The important thing is to be asked for my password, okay well the samba. smile

Offline

#8 2016-10-19 15:48:36

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

As mentioned, this entirely depends on the program you try to mount the device with, so we need to know which that would be...

Offline

#9 2016-10-19 19:15:51

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

I use dolphin for mount samba, i think you mean this!

Offline

#10 2016-10-19 20:25:08

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

Dolphin should be using policykit in order to mount devices that require root privs.
This implies a polkit agent must be running. Which Desktop environment? Plasma ("KDE")?
What's the output of "ps ax | grep polkit"

Offline

#11 2016-10-19 20:28:10

headkase
Member
Registered: 2011-12-06
Posts: 1,976

Re: I want that mount samba, with entry in fstab, ask me password

If you want to mount it without a password, put the fstab mount-point within your users /home folder and then in the fstab add "users" to the options.  Users allows mounting without a password as long as the mount point is within the users home folder.

Offline

#12 2016-10-19 20:44:31

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

No, he really seems to want to be challanged.

@step, since your request is quite odd, are you aware that you can eg. allow only a certain group to mount such devices, but allow them to mount it w/o supplying any credentials?

Offline

#13 2016-10-19 21:05:18

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

No, he really seems to want to be challanged.

@step, since your request is quite odd, are you aware that you can eg. allow only a certain group to mount such devices, but allow them to mount it w/o supplying any credentials?

The request is only one, i want that he asks me password of samba server es: username: server password: mypassword and i want that one window it appears to write mypasswod xD such as partition with windows.

Offline

#14 2016-10-19 21:09:56

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

That's not what you asked for before....
Anyway, enter "smb:" into dolphins urlbar and just use the smb kioslave.

Offline

#15 2016-10-19 21:25:56

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

That's not what you asked for before....
Anyway, enter "smb:" into dolphins urlbar and just use the smb kioslave.

Yes, i tell you that i have insert entry samba in /etc/fstab and i look entry, i can mount correctly but dolphin don't asks me to write password with window pop-up. I want the window for the insert of password

Offline

#16 2016-10-19 21:26:32

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

That's not what you asked for before....
Anyway, enter "smb:" into dolphins urlbar and just use the smb kioslave.

Yes, i tell you that i have insert entry samba in /etc/fstab and i look entry, i can mount correctly but dolphin don't asks me to write password with window pop-up. I want the window for the insert of password.

EDIT:
Sorry, I explained badly. If I insert (like you said) in the URL path of the dolphin, then the check box; I want him to do the same thing with the addition in the fstab file. I do not know if I give the idea.

Last edited by step (2016-10-19 21:29:15)

Offline

#17 2016-10-19 21:36:24

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

"asks my or root password" - that's not the cifs authorisation.

I doubt this will work via fstab, notably not when you provide the cifs credentials there. But the smb kio should work and ask you for the cifs credentials (and no local passwords are required)

Offline

#18 2016-10-20 10:23:54

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

"asks my or root password" - that's not the cifs authorisation.

I doubt this will work via fstab, notably not when you provide the cifs credentials there. But the smb kio should work and ask you for the cifs credentials (and no local passwords are required)

What I wanted to say is, if I remove from the fstab file .credentials I see no asking me any password. That's why I put the file in fstab. Then I would make sure that if I remove the fstab file inside, I get a window to enter the password (like when I mount the partition with windows).

Offline

#19 2016-10-20 11:51:57

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

Yes, forget about mount and fstab and use the kioslave instead, ie "smb://server"

Offline

#20 2016-10-21 09:26:54

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

Yes, forget about mount and fstab and use the kioslave instead, ie "smb://server"

I do not understand what you mean, there is a solution to my "problem"? Or leave everything unchanged?

Offline

#21 2016-10-21 13:27:07

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: I want that mount samba, with entry in fstab, ask me password

What we are suggesting is :

remove (or comment out ) the entry from fstab

//my.server.ip/shared.folder  /path/to/mount    cifs    credentials=/home/.credentials,user,noauto,uid=1000,rw        0 0

When you want to access the network share, open Dolphin
In dolphin's url-bar, type smb://my.server.ip/shared.folder

Dolphin should give you a dialog window asking for the username /password needed to access the shared folder.

filesystem,permisssion, where to mount etc will be figured out by dolphin/ smb / KDE kio-slaves


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#22 2016-10-21 13:46:54

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

Lone_Wolf wrote:

What we are suggesting is :

remove (or comment out ) the entry from fstab

//my.server.ip/shared.folder  /path/to/mount    cifs    credentials=/home/.credentials,user,noauto,uid=1000,rw        0 0

When you want to access the network share, open Dolphin
In dolphin's url-bar, type smb://my.server.ip/shared.folder

Dolphin should give you a dialog window asking for the username /password needed to access the shared folder.

filesystem,permisssion, where to mount etc will be figured out by dolphin/ smb / KDE kio-slaves

Yes it's work, but dolphin is bug cause if i try to open media file with this step, it's freeze so i need to mount my server by fstab cause with that i can stream my file correctly smile

Offline

#23 2016-10-21 14:16:04

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: I want that mount samba, with entry in fstab, ask me password

Stuff mounted by the system is afaics treated opaque by kio, ie. mounting it will either work, fail or ask you for a *local* password, but there won't be detection of the mounted filesystem to trigger further steps, notably since KDE traditionally relies on kio (what has advances and drawbacks)

*Dolphin* freezes when trying to open media this way? Or the mediaplayer?
This largely depends on how the mediaplayer is invoked, either by [%f]ile or by [%u]rl - if it's by file, kio will first download a local copy because if (falsely?) assumes the mediaplayer cannot handle urls.

Offline

#24 2016-10-21 16:42:47

step
Member
Registered: 2016-05-09
Posts: 56

Re: I want that mount samba, with entry in fstab, ask me password

seth wrote:

Stuff mounted by the system is afaics treated opaque by kio, ie. mounting it will either work, fail or ask you for a *local* password, but there won't be detection of the mounted filesystem to trigger further steps, notably since KDE traditionally relies on kio (what has advances and drawbacks)

*Dolphin* freezes when trying to open media this way? Or the mediaplayer?
This largely depends on how the mediaplayer is invoked, either by [%f]ile or by [%u]rl - if it's by file, kio will first download a local copy because if (falsely?) assumes the mediaplayer cannot handle urls.

I can not understand what you mean!
In any case, the problem arises when I mount samba through URL and open a media file via my media player (VLC) is as follows:

L'ingresso non può essere aperto:
VLC non è in grado di aprire il MRL 'smb://pi@192.168.1.59/Server/Video/Film/Visti/Cinquanta sbavature di Nero (2016) FULL HD 1080p AC3 DTS ITA ENG Sub.MKV'. Controlla il registro per i dettagli.

However, this error does not occur when I mount my server via fstab. That's why I preferred this alternative, although not explicitly asks me username and password through the appropriate window.

Offline

#25 2016-10-21 16:52:22

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: I want that mount samba, with entry in fstab, ask me password

step wrote:

In any case, the problem arises when I mount samba through URL and open a media file via my media player (VLC) is as follows:

Why was this information not included in your initial post?

Offline

Board footer

Powered by FluxBB