smb

SUSE12SP3-Samba配置

落爺英雄遲暮 提交于 2019-12-02 15:55:49
简介 samba官网: https://www.samba.org/ 维基百科: https://zh.wikipedia.org/wiki/Samba Samba,是种用来让UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS(Server Message Block/Common Internet File System)网络协议做链接的自由软件。第三版不仅可访问及分享SMB的文件夹及打印机,本身还可以集成入Windows Server的网域,扮演为网域控制站(Domain Controller)以及加入Active Directory成员。简而言之,此软件在Windows与UNIX系列操作系统之间搭起一座桥梁,让两者的资源可互通有无。 安装 SUSE12SP3无需安装,系统默认安装好了。 配置 [global] # 全局配置 workgroup = WORKGROUP dns proxy = no log file = /var/log/samba/%m.log max log size = 1000 client max protocol = NT1 server role = standalone server passdb backend = tdbsam obey pam restrictions = yes unix password sync =

How do you force a CIFS connection to unmount

萝らか妹 提交于 2019-12-02 13:49:50
I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unkillable while you wait. I can't even run ls in my home directory because there is a symlink pointing inside the CIFS mount and ls tries to follow it to decide what color it should be. If I try to umount it (even with -fl), the umount process hangs just like ls does. Not even sudo kill -9 can kill it. How can I force the kernel to unmount? I use lazy unmount: umount -l (that's a lowercase L ) Lazy

Counting files on a shared windows drive via Php from Linux

泪湿孤枕 提交于 2019-12-02 13:30:34
问题 I have files with .msg extension on a windows shared folder and my php server is Linux (LAMP server). I am trying to write a php script which simply counts the number of .msg files on the Windows shared folder. I am using smbclient class and this is what I wrote: <?php require_once ('smbclient.php'); $smbc = new smbclient ('//192.168.10.14/reservations', 'user', 'pass'); $handle = popen ($smbc); $files = glob($handle . '*.msg'); $filecount = count( $files ); echo $filecount; ?> However, I am

Mapping an Azure File Service CloudFileShare as a virtual directory on each instance of a cloud service

送分小仙女□ 提交于 2019-12-02 07:15:36
问题 I have an azure cloud service which I am attempting to upgrade for high availability and I have subscribed to the Microsoft Azure File Service preview which has been enabled in the preview portal. I have created a new storage account and can see the storage account now has a Files endpoint located at: https://<account-name>.file.core.windows.net/ Within my web role I have the following code which looks to see if a share called scorm is created and if not it creates it: public static void

How do I use JCIFS with apache VFS to access an SMB URL?

余生颓废 提交于 2019-12-01 17:18:17
I am trying to access a folder on my local computer using an smb URL. my project is using the jars: commons-vfs2-2.0.jar and jcifs-1.3.17.jar (and all the other required jars). The code in it's entirety is: public static void main(String[] args) throws FileSystemException { jcifs.Config.registerSmbURLHandler(); StaticUserAuthenticator auth = new StaticUserAuthenticator(<domain>,<user>,<password>); FileSystemOptions opts = new FileSystemOptions(); DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth); FileSystemManager fs = VFS.getManager(); FileObject smbFile = fs

Log in to a windows network share (SMB) for this process only

假如想象 提交于 2019-12-01 14:31:56
It's easy to log into a Windows network share (SMB) for the whole user session (e.g. net use , WNetAddConnection2() etc). Is there any similar way that will only impact my current process? Some kind of token system, maybe? Whole session auth is okay if there's really no alternative, but I would rather avoid a "global solution to a local problem". Network sessions are handled by the windows kernel as part of the smb client driver, as such they are managed per windows workstation (not the user actually), meaning that you can't access the same share with two different credentials, and you can't

Log in to a windows network share (SMB) for this process only

此生再无相见时 提交于 2019-12-01 12:47:15
问题 It's easy to log into a Windows network share (SMB) for the whole user session (e.g. net use , WNetAddConnection2() etc). Is there any similar way that will only impact my current process? Some kind of token system, maybe? Whole session auth is okay if there's really no alternative, but I would rather avoid a "global solution to a local problem". 回答1: Network sessions are handled by the windows kernel as part of the smb client driver, as such they are managed per windows workstation (not the

【SMB源码解析系列】——002.RESET中断

依然范特西╮ 提交于 2019-12-01 09:54:15
跟随代码结尾处的中断向量,我们可以看到RESET中断所在地址为Start标签处。 这部分代码比较简单,从字面便可基本理解。 1.(682~683)状态寄存器设置,sei指令用于禁用IRQ中断,SMB中并没有用到它,cld指令用于设置CPU在执行数学运算指令时以二进制进行 2.(684~685)PPU_CTRL_REG1($2000)端口初始化设置,这里要对任天堂游戏系统的硬件控制端口有所了解,暂时可以先记住D7位为0表示禁用NMI中断 3.(686~687)TXS指令用于通过X寄存器设置栈寄存器的值,一般在代码最初指向栈顶(#$FF) 4.(688~691)读PPU_STATUS然后调用BPL指令是一个较为常见的组合,只有当PPU进入VBlank状态,才会结束循环,一般会调用2次,主要用于PPU的预热 5.(692~703)这里我们先看一下703行的InitializeMemory函数,它的主要作用是将RAM中的数据进行初始化(写入#$00),但是根据Y寄存器的值, 可以略过某些地址范围,使该范围内的地址空间保存原样。 Y寄存器的值可能为#ColdBootOffset或#WarmBootOffset,WarmBootOffset会控制InitializeMemory函数初始化RAM时略过一部分内存空间, 其中就包括了TopScoreDisplay所在位置

linux系统共享文件夹

守給你的承諾、 提交于 2019-12-01 08:39:48
1.打开CentOS7的终端Konsole,使用“rpm -qi samba"命令查询是否已经安装了Samba,然后使用“yum install samba”命令,下载Samba包并安装。输入“y”,确认安装软件和软件依赖包。 2.使用“rpm -qa | grep samba”查看已经安装好的Samba的信息 3.添加共享文件夹的用户,使用“smbpasswd -a username”。 smbpasswd命令的常用方法smbpasswd -a 增加用户(要增加的用户必须是系统用户)smbpasswd -d 冻结用户,就是这个用户不能在登录了smbpasswd -e 恢复用户,解冻用户,让冻结的用户可以在使用smbpasswd -n 把用户的密码设置成空. 要在global中写入 null passwords -truesmbpasswd -x 删除用户 4.使用命令“mkdir /home/noiccy/myshare”,在用户noiccy文件夹下新建“myshare”共享文件夹。 5.使用命令“chmod -R 777 /home/willy/myshare”,将整个myshare文件夹与其中的文件和子目录的权限都设置为rwxrwxrwx,即所有人都可以查看操作。777: 0表示没有权限,1表示可执行权限,2表示可写权限,4表示可读权限,然后将其相加

Escape special characters in mount command

人盡茶涼 提交于 2019-12-01 04:18:41
I am trying to mount a windows shared folder on Mac OSX Mavericks. A simplistic user name and password worked fine mount -t smbfs //user2:password2@server1.mydomain.com/myproject ~/localmap On trying out the more valid user name and password I am getting errors that parsing URL failed. The details are Username: mydomain\user1 Password: A%b$c@d!e#f The command tried is mount -t smbfs //mydomain\user1:A%b\$c\@d\!e#f@server1.mydomain.com/myproject ~/localmap Based on what I found, $ and ! needs to be escaped. Need help on how to escape the special characters. Incidentally, using only the username