mount cifs share on OpenBSD 5.9

2016-06-29 Thread Rashad Kanavath
Hello all,

I tried to mount a network drive using shlight. But it is not working. Here
is the command with verbose output.

using smbclient -L ... , I can list the drive. so this must be something
else.

FYI, on linux i used to mount using mount.cifs

shlight //networkdrive/share /media/share -U user -C -D0xff -W WORKGROUP
psitable_insert(): inserting inode 449722290: -><-
Kernel: smb_proc_connect: Passed SESSION REQUEST.
Kernel: len: 99, wct: 17, bcc: 30
Kernel: smb_proc_connect: Request SMBnegprot..Kernel: Verified!
Kernel: smb_proc_connect: Server wants NT LANMAN 1.0 protocol.
Kernel: smb_proc_connect: password = ***
Kernel: smb_proc_connect: usernam = user
Kernel: smb_proc_connect: blkmode = 0
Kernel: smb_proc_connect: workgroup = WORKGROUP
Kernel: len: 35, wct: 0, bcc: 0
Kernel: smb_errno: Kernel: ERRDOS - ERRnoaccess (Access denied.)Kernel:
Kernel: smb_proc_connect: SMBsessetupX failed
error connecting to server: [13] Permission denied

Any help will be much appreciated.

-- 
Regards,
   Rashad



Re: mount cifs share on OpenBSD 5.9

2016-06-29 Thread Marcus MERIGHI
mohammedrasha...@gmail.com (Rashad Kanavath), 2016.06.29 (Wed) 19:18 (CEST):
> I tried to mount a network drive using shlight. But it is not working. Here
> is the command with verbose output.
> 
> using smbclient -L ... , I can list the drive. so this must be something
> else.

I haven't tested this lately, this is just what I could find quickly.

Last time I tried I couldn't make it work, too. I turned to: 

sysutils/usmb

mount SMB shares from userland via FUSE

Description:
usmb lets you mount SMB shares as unprivileged users via FUSE, in the
vein of Windows' Map Network Drive facility. It differs from the other
FUSE SMB filesystems (fusesmb, SMB for FUSE) in that it doesn't have
Network Neighbourhood functionality: this means that you can mount
shares that you can't see via NetBIOS browsing.

(Note: unprivileged mounting requires both kern.usermount=1 and access
to /dev/fuse0).


The last sentence apparently did not work for me. I did not try too
hard, though, iirc. 

My ~/.usmb.conf (with file permissions for root, since I was running
this via doas):


10.10.10.254
WiFiDisk1_Volume1
/mnt



And in ~/.kshrc:
alias wlandisk="doas usmb wd"

Bye, Marcus

> !DSPAM:577402f7267669153224385!



Re: mount cifs share on OpenBSD 5.9

2016-06-30 Thread Rashad Kanavath
On Wed, Jun 29, 2016 at 9:08 PM, Marcus MERIGHI 
wrote:

> mohammedrasha...@gmail.com (Rashad Kanavath), 2016.06.29 (Wed) 19:18
> (CEST):
> > I tried to mount a network drive using shlight. But it is not working.
> Here
> > is the command with verbose output.
> >
> > using smbclient -L ... , I can list the drive. so this must be something
> > else.
>
> I haven't tested this lately, this is just what I could find quickly.
>
> Last time I tried I couldn't make it work, too. I turned to:
>
> sysutils/usmb
>
> mount SMB shares from userland via FUSE
>
> Description:
> usmb lets you mount SMB shares as unprivileged users via FUSE, in the
> vein of Windows' Map Network Drive facility. It differs from the other
> FUSE SMB filesystems (fusesmb, SMB for FUSE) in that it doesn't have
> Network Neighbourhood functionality: this means that you can mount
> shares that you can't see via NetBIOS browsing.
>
> (Note: unprivileged mounting requires both kern.usermount=1 and access
> to /dev/fuse0).
>
>
> The last sentence apparently did not work for me. I did not try too
> hard, though, iirc.
>
> My ~/.usmb.conf (with file permissions for root, since I was running
> this via doas):
>
> 
> 10.10.10.254
> WiFiDisk1_Volume1
> /mnt
> 
> 
>
> And in ~/.kshrc:
> alias wlandisk="doas usmb wd"
>

Thanks Markus. It worked for me.  However I miss the option allow_other to
have read and write without root  privilages. I see there are some options
in the doc. But I didn't looked it properly. will test this later and
report back if any issues.


> Bye, Marcus
>
> > !DSPAM:577402f7267669153224385!
>



-- 
Regards,
   Rashad