This is a discussion on [Samba] Mounting Samba Share using linux login within the Samba forums, part of the Networking and Network Related category; Windows users are able to mount samba share using windows. But for linux user, we need to create credentials file, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Windows users are able to mount samba share using windows. But for
linux user, we need to create credentials file, to mount samba share e.g: //servername/file_store /home/user/Desktop/file_storage smbfs credentials=/root/.smbcredentials Is it possbile to change the credentials to something like windows users (for example credentials=unix user) so as the mounted share would depend on who login the linux box? This is important as I want to let user change their own password, and keeping .smbcredentials in user's home directory would be insecure. But to keep the .smbcredentials at root would mean to give user admin rights in order to change password file. Regards, David -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
Hallo, David,
Du (d.kuntadi) meintest am 11.06.08: > Windows users are able to mount samba share using windows. But for > linux user, we need to create credentials file, to mount samba share > e.g: > //servername/file_store /home/user/Desktop/file_storage smbfs > credentials=/root/.smbcredentials > Is it possible to change the credentials to something like windows > users (for example credentials=unix user) so as the mounted share > would depend on who login the linux box? You can make your own credential file as a batch file: @echo off rem my special batch file set specialusername=abc set specialpassword=topsecret call this batch file within the logon batch file and then use %specialusername% and %specialpassword% Viele Gruesse! Helmut -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
On Wed, Jun 11, 2008 at 5:55 PM, Helmut Hullen <Hullen@t-online.de> wrote:
> > You can make your own credential file as a batch file: > > @echo off > rem my special batch file > set specialusername=abc > set specialpassword=topsecret > > call this batch file within the logon batch file > and then use %specialusername% and %specialpassword% Hi Helmut, Thank you very much for your reply. But could you elaborate further as I could not understand how to do it: 1. What credentials should I put in fstab? 2. Do you mean the batch file is an executable plain text file executed during login? Regards, David -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
Hallo, David,
Du (d.kuntadi) meintest am 11.06.08: >> >> You can make your own credential file as a batch file: >> >> @echo off >> rem my special batch file >> set specialusername=abc >> set specialpassword=topsecret >> >> call this batch file within the logon batch file >> and then use %specialusername% and %specialpassword% Sorry - I've written a batch file for DOS/Windows. Linux users should use a shell script. There are several options to run this shell: /etc/profile.d/<specialscript.sh> (is run when the user logs in) Icon on the desktop (must be clicked to run) command in ~/.Xdefaults (is run when an X session is started) > 1. What credentials should I put in fstab? None. "/etc/fstab" is not necessary for mounting. And the special user share can't be mounted via the (global) "/etc/ fstab". Which linux distribution is installed on the clients? Which GUI is installed: KDE or something else? > 2. Do you mean the batch file is an executable plain text file > executed during login? That is one way. pure shell script: #! /bin/bash Credfile=~/.sambacred test -s $Credfile && source $Credfile || exit 1 # and now the username and the password for the shares on the # server are known mount.cifs ... # Viele Gruesse! Helmut -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
> Sorry - I've written a batch file for DOS/Windows.
> Linux users should use a shell script. > There are several options to run this shell: > Although I have not done this yet (waiting for linux dfs client to work 2.6.26 kernel), I believe pam_mount is also a good option for this purpose: http://pam-mount.sourceforge.net/ John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
Hallo, John,
Du (drescherjm) meintest am 11.06.08: >> Linux users should use a shell script. >> There are several options to run this shell: [...] > Although I have not done this yet (waiting for linux dfs client to > work 2.6.26 kernel), I believe pam_mount is also a good option for > this purpose: Only root can change these options. If I put my script into the profile way or into .Xdefaults (p.e.), then I can mount several foreign shares on several servers without asking my root. Ok - "mount.cifs" must have set the "SUID" flag. Viele Gruesse! Helmut -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
On Wednesday 11 June 2008 14:50, John Drescher wrote:
> > Sorry - I've written a batch file for DOS/Windows. > > Linux users should use a shell script. > > There are several options to run this shell: > > Although I have not done this yet (waiting for linux dfs client to > work 2.6.26 kernel), I believe pam_mount is also a good option for > this purpose: > > http://pam-mount.sourceforge.net/ pam_mount is the best solution as it mounts the sahre with the unix user credentials. Best regards Gustavo -- Angulo Sólido - Tecnologias de Informação http://angulosolido.pt -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
Yes, I think pam mount is what I need. I will study it and report if
it is successfull. Anyway, thanks also for Helmut for the idea. Regards, David On Thu, Jun 12, 2008 at 3:13 AM, Gustavo Homem <gustavo@angulosolido.pt> wrote: > On Wednesday 11 June 2008 14:50, John Drescher wrote: >> > Sorry - I've written a batch file for DOS/Windows. >> > Linux users should use a shell script. >> > There are several options to run this shell: >> >> Although I have not done this yet (waiting for linux dfs client to >> work 2.6.26 kernel), I believe pam_mount is also a good option for >> this purpose: >> >> http://pam-mount.sourceforge.net/ > > pam_mount is the best solution as it mounts the sahre with the unix user > credentials. > > Best regards > Gustavo > > -- > Angulo Sólido - Tecnologias de Informação > http://angulosolido.pt > -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|||
|
I have followed below guidelines which is a little bit outdated:
https://wiki.ubuntu.com/MountWindows...2b50541c417d95 It is mounted successfully by editing /etc/security/pam_mount.conf.xml instead of /etc/security/pam_mount.conf, and follow the direction in the /etc/security/pam_mount.conf.xml. Now user could change samba password using usermin, and then followed by changeing its own password to match, and the share would mount autimatically. Thanks again, David On Thu, Jun 12, 2008 at 7:54 AM, David Kuntadi <d.kuntadi@gmail.com> wrote: > Yes, I think pam mount is what I need. I will study it and report if > it is successfull. > > Anyway, thanks also for Helmut for the idea. > > Regards, > David > > On Thu, Jun 12, 2008 at 3:13 AM, Gustavo Homem <gustavo@angulosolido.pt> wrote: >> On Wednesday 11 June 2008 14:50, John Drescher wrote: >>> > Sorry - I've written a batch file for DOS/Windows. >>> > Linux users should use a shell script. >>> > There are several options to run this shell: >>> >>> Although I have not done this yet (waiting for linux dfs client to >>> work 2.6.26 kernel), I believe pam_mount is also a good option for >>> this purpose: >>> >>> http://pam-mount.sourceforge.net/ >> >> pam_mount is the best solution as it mounts the sahre with the unix user >> credentials. >> >> Best regards >> Gustavo >> >> -- >> Angulo Sólido - Tecnologias de Informação >> http://angulosolido.pt >> > -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |