How to store passwords for Windows Shares in Dolphin/KNetAttach?

Guus gbonnema at xs4all.nl
Fri Feb 24 08:28:59 UTC 2012


On 02/23/2012 02:39 PM, knutihe at web.de wrote:
> On 23.02.2012 14:14, Guus wrote:On 02/23/2012 02:05 PM, Guus wrote:
>   If you really want this automated, why not create a script that mounts the share with the password in it? Make sure the script is only readable and writable by you or by root, and only executable by others or not.
> Then execute the script either at startup or at logon.
>
> Hope this helps.
>
> Guus.
>   Problem with this is, that root mounts the drives then and the normal user does not have rights to write files in these shared folders, as far as i know. That was the problem that I always had when I scripted it directly in /etc/fstab. Btw. I'm in an enterprise environment.
>
Try out some of the mount options. Maybe you can pre-determine who is 
declared owner of the files.

For example, I used to mount a windows partition (NTFS) with root, where 
I entered the UID and GID to conform to my regular user.
Try this out for your file system and see if it works. For NTFS i added 
the option uid=1000,gid=1000.

The man page explains as follows:

"
Mount options for ntfs
<snip other doc options >
        uid=value, gid=value and umask=value
               Set the file permission on the filesystem.  The umask 
value is given in octal.  By default, the files are owned by root and 
not readable by somebody else.

"

Ofcourse you will probably be using smbmount. Havent got it installed, 
but you can look it up on your own system. Hope this helps.

Guus Bonnema.





More information about the kubuntu-users mailing list