ubuntu下使用qemu模拟ARM(一)-------安装samba服务器

Samba是SMB的一种实现方法,主要用来实现Linux系统的文件和打印服务。Linux用户通过配置使用Samba服务器可以实现与Windows用户的资源共享。

1. 安装samba软件包

安装samba:sudo apt-get install samba
安装smbclient:sudo apt-get install smbclient

2.关闭与重启命令

关闭samba命令:book@book-virtual-machine:/$ /etc/init.d/samba stop 该命令关闭了smbd.service和nmbd.service两个服务

重启samba服务:book@book-virtual-machine:/$ /etc/init.d/samba restart  将smbd.service和nmbd.service两个服务重新启动

3.配置samba服务

首先建立一个共享文件夹book@book-virtual-machine:/$ sudo mkdir samba_share

然后修改配置文件:/etc/samba/smb.conf ,在smb.conf 文件的最末尾加入下面的内容:


[share]
comment = Shared Folder require password
path = /samba_share
public = yes
writable = yes
valid users = share
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
available = yes
browseable = yes

保存后重新启动samba:sudo /etc/init.d/samba restart

4.设置用户和密码
sudo smbpasswd -a share 接着俺提示输入密码。(前提是添加了此用户:useradd share)
否则系统在没有此用户的前提下按默认操作是会报如下错的:
增加samba用户提示Failed to add entry for user
root@tyc-virtual-machine:/home#  smbpasswd -a share
New SMB password:
Retype new SMB password:
Failed to add entry for user share.
解决办法:
这是因为没有加相应的系统账号,所以会提示Failed to add entry for user的错误,只需增加相应的系统账号share就可以了:
root@tyc-virtual-machine:/home#  groupadd share -g 6000
[root@tyc-virtual-machine:/home# useradd share -u 6000 -g 6000 -s /sbin/nologin -d /dev/null

eddard@hf-d-l-010789a:~/sambashare/QCM6490_Ubuntu_R60_r006$ qemu-arm-static -version qemu-arm version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.27) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers eddard@hf-d-l-010789a:~/sambashare/QCM6490_Ubuntu_R60_r006$ ls '${OTA_OSS}' build-qti-distro-ubuntu-fullstack-perf build.sh build_wf.sh disregard docker_env downloads poky prebuilt_HY11 setup-environment src syncbuild.sh eddard@hf-d-l-010789a:~/sambashare/QCM6490_Ubuntu_R60_r006$ source build_wf.sh [sudo] eddard 的密码: Start preparing the download package. The following files are missing: //downloads/downloads.tar.gz.0 //downloads/downloads.tar.gz.1 //downloads/downloads.tar.gz.2 //downloads/downloads.tar.gz.3 //downloads/downloads.tar.gz.4 //downloads/downloads.tar.gz.5 Merging file... ./qti-conf/merger.sh: line 58: //downloads/downloads.tar.gz: No such file or directory Completion of merger. merger FAILED, please check whether the split file downloads.tar.gz exists The download package is ready. find: ‘../bitbake’: No such file or directory -i used with no filenames on the command line, reading from STDIN. ### Shell environment ready with following configuration to run bitake commands. ### DISTRO = qti-distro-ubuntu-fullstack-perf MACHINE = qcs6490-odk You can now run 'bitbake <target>' Supported image targets are: qti-ubuntu-console-image qti-ubuntu-robotics-image Build command: Complete Compilation: build-qti-ubuntu-robotics-image bootimg: make-boot systemimg: make-system persistimg: make-persist cacheimg: make-cache userdataimg: make-userdata kernel: bitbake linux-msm or rebake linux-msm Run 'bitbake <pkg-name>' to build a required package, example: bitbake systemd eddard@e768aad405e8:~/sambashare/QCM6490_Ubuntu_R60_r006/build-qti-distro-ubuntu-fullstack-perf$ qemu-arm-static -version bash: qemu-arm-static: command not found eddard@e768aad405e8:~/sambashare/QCM6490_Ubuntu_R60_r006/build-qti-distro-ubuntu-fullstack-perf$ cd .. eddard@e768aad405e8:~/sambashare/QCM6490_Ubuntu_R60_r006$ qemu-arm-static -version bash: qemu-arm-static: command not found eddard@e768aad405e8:~/sambashare/QCM6490_Ubuntu_R60_r006$ update-binfmts --enable qemu-arm bash: update-binfmts: command not found 为什么source之后,qemu就不现实版本号了
09-24
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值