摘要
针对Linux系统下配置Samba共享服务只能通过用户手动编辑配置文件,且配置项众多、步骤繁琐、上手困难等问题,分析了Samba配置文件的结构和配置项的具体作用,结合重载Samba配置和使配置生效的相关系统指令,通过Python的OS库执行系统命令,设计了基于Python的Samba配置解析算法,解析系统中已存在的Samba配置和生成可用的Samba配置文件,使用Pyside2设计了基于QT的图形化界面展示解析结果、接收用户输入的参数及响应用户操作。实际应用结果表明,该工具实现了Samba服务的图形化配置功能,并可以方便地移植到嵌入式设备上。
In view of the problems that the configuration of the Samba sharing service under the Linux system can only be manually edited by the user,and the configuration items are cumbersome and difficult to get started,the structure of the Samba configuration file and the specific role of the configuration items are analyzed,and combined with overloading the Samba configuration and Relevant system instructions to make the configuration effective,execute system commands through the Python OS library,design a Python-based Samba configuration parsing algorithm,analyze the existing Samba configuration in the system and generate usable Samba configuration files,and use Pyside2 to design a QT-based Graphical interface displays analysis results,receives user input parameters and responds to user operations. The actual application results show that the tool realizes the graphical configuration function of Samba service,and can be easily transplanted to embedded devices.
作者
胡浩
吴军平
HU Hao;WU Junping(Wuhan Research Institute of Posts and Telecommunications,Wuhan 430074,China;Fiberhome Communication Technology Co.,Ltd.,Wuhan 430074,China)
出处
《电子设计工程》
2022年第4期180-183,188,共5页
Electronic Design Engineering