当前位置: 技术问答>linux和unix
我在虚拟机中装了samba服务器。。。终端显示了samba上的共享资源,但不知道怎么获取资源?那位大侠能指导一下。。。谢谢。。。。
来源: 互联网 发布时间:2016-06-06
本文导语: [root@localhost samba]# smbclient -L localhost -U student2 Enter student2's password: Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.2.0pre3-9.fc9] Sharename Type Comment --------- ---- ------- qinguan2 Disk...
[root@localhost samba]# smbclient -L localhost -U student2
Enter student2's password:
Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.2.0pre3-9.fc9]
Sharename Type Comment
--------- ---- -------
qinguan2 Disk
student1 Disk
share Disk sharefile
IPC$ IPC IPC Service (Samba Server Version 3.2.0pre3-9.fc9)
VMware_Virtual_Printer Printer VMware_Virtual_Printer
student2 Disk Home Directories
Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.2.0pre3-9.fc9]
Server Comment
--------- -------
Workgroup Master
--------- -------
[root@localhost samba]#
上面显示了显示了三个共享资源:qinguan2 student1 share
我不知道怎么进去?
下面是相关参数:
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
smb passwd file = /etc/samba/smbpasswd
username map = /etc/samba/smbusers
log file = /var/log/samba/log.%m
max log size = 50
cups options = raw
[homes]
comment = Home Directories
read only = No
directory mask = 0700
browseable = No
[qinguan2]
path = /home/qinguan2
read list = @student, student1, qinguan2
write list = @student, qinguan2
read only = No
guest ok = Yes
[student1]
path = /home/student1
read list = @student, qinguan2
read only = No
guest ok = Yes
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[share]
comment = sharefile
path = /home
read list = student1, qinguan2, @student
write list = @student, qinguan2
read only = No
guest ok = Yes
[root@localhost samba]#
另外,我想知道如何获取虚拟机中samba服务器的ip地址。
虚拟机安装的是Fedora Core 9。
Enter student2's password:
Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.2.0pre3-9.fc9]
Sharename Type Comment
--------- ---- -------
qinguan2 Disk
student1 Disk
share Disk sharefile
IPC$ IPC IPC Service (Samba Server Version 3.2.0pre3-9.fc9)
VMware_Virtual_Printer Printer VMware_Virtual_Printer
student2 Disk Home Directories
Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.2.0pre3-9.fc9]
Server Comment
--------- -------
Workgroup Master
--------- -------
[root@localhost samba]#
上面显示了显示了三个共享资源:qinguan2 student1 share
我不知道怎么进去?
下面是相关参数:
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
smb passwd file = /etc/samba/smbpasswd
username map = /etc/samba/smbusers
log file = /var/log/samba/log.%m
max log size = 50
cups options = raw
[homes]
comment = Home Directories
read only = No
directory mask = 0700
browseable = No
[qinguan2]
path = /home/qinguan2
read list = @student, student1, qinguan2
write list = @student, qinguan2
read only = No
guest ok = Yes
[student1]
path = /home/student1
read list = @student, qinguan2
read only = No
guest ok = Yes
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[share]
comment = sharefile
path = /home
read list = student1, qinguan2, @student
write list = @student, qinguan2
read only = No
guest ok = Yes
[root@localhost samba]#
另外,我想知道如何获取虚拟机中samba服务器的ip地址。
虚拟机安装的是Fedora Core 9。
|
一定要加上个“-”。。。你直接用su root会继承当前用户的用户配置。。。而不会是root用户的配置
|
[root@RHEL4_U5 ~]# smbmount
Usage: mount.smbfs service mountpoint [-o options,...]
Version 3.0.10-1.4E.11
Options:
username= SMB username
password= SMB password
credentials= file with username/password
krb use kerberos (active directory)
netbiosname= source NetBIOS name
uid= mount uid or username
gid= mount gid or groupname
port= remote SMB port number
fmask= file umask
dmask= directory umask
debug= debug level
ip= destination host or IP address
workgroup= workgroup on destination
sockopt= TCP socket options
scope= NetBIOS scope
iocharset= Linux charset (iso8859-1, utf8)
codepage= server codepage (cp850)
unicode use unicode when communicating with server
lfs large file system support
ttl= dircache time to live
guest don't prompt for a password
ro mount read-only
rw mount read-write
This command is designed to be run from within /bin/mount by giving
the option '-t smbfs'. For example:
mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test
[root@RHEL4_U5 ~]#
Usage: mount.smbfs service mountpoint [-o options,...]
Version 3.0.10-1.4E.11
Options:
username= SMB username
password= SMB password
credentials= file with username/password
krb use kerberos (active directory)
netbiosname= source NetBIOS name
uid= mount uid or username
gid= mount gid or groupname
port= remote SMB port number
fmask= file umask
dmask= directory umask
debug= debug level
ip= destination host or IP address
workgroup= workgroup on destination
sockopt= TCP socket options
scope= NetBIOS scope
iocharset= Linux charset (iso8859-1, utf8)
codepage= server codepage (cp850)
unicode use unicode when communicating with server
lfs large file system support
ttl= dircache time to live
guest don't prompt for a password
ro mount read-only
rw mount read-write
This command is designed to be run from within /bin/mount by giving
the option '-t smbfs'. For example:
mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test
[root@RHEL4_U5 ~]#
|
你切换用户的时候。。。用su - root就行了,你出现command not found的原因是:
root用户继承了普通用户的用户配置文件.bash_profile和.bashrc,此时若你要继承root用户的配置文件的话要用su -或者是su - root才行
|
学习!