linux系统下用mount命令挂载到windows下。提示输入密码,但是输入了密码后也不能挂载成功。我的命令如下。

2024-12-12 20:26:14
推荐回答(3个)
回答1:

mount -t cifs -o username=0,password=pwd //192.168.1.160/share /mnt/winc
老系统就用这个:
mount -t smbfs -o username=0,password=pwd //192.168.1.160/share /mnt/winc
这里你要搞清什么是cifs和smbfs吧。cifs在各大主流存储厂商里使用还是很多的。说到smbfs你又要弄清samba是怎么回事了。唉越学越无知啊。
这里MAN:
-t, --types vfstype
The argument following the -t is used to indicate the filesystem type. The filesystem types which are currently supported include: adfs, affs, autofs, cifs, coda, coherent, cramfs, debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs, hfsplus, hpfs, iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc, qnx4, ramfs, reiserfs, romfs, squashfs, smbfs, sysv, tmpfs, ubifs, udf, ufs, umsdos, usbfs, vfat, xenix, xfs, xiafs. Note that coherent, sysv and xenix are equivalent and that xenix and coherent will be removed at some point in the future - use sysv instead. Since kernel version 2.1.21 the types ext and xiafs do not exist anymore. Earlier, usbfs was known as usbdevfs. Note, the real list of all supported filesystems depends on your kernel.
-t后面可以跟cifs和smbfs.
想精通LINUX还要多看man的,当然学好英语先是必须的了。mount命令博大精深,但是我们常用的就那么几条。推荐你用DEBIAN和OpenSuse. 个人认为DEBIAN是最好的免费LINUX系统了。千万不要用红帽,相信哥,你会被它搞疯掉的。

回答2:

mount -t cifs -o username=username,password=pw //192.168.1.160/share /mnt
或者
mount -t cifs -o codepages=cp936,username=user,password=pw,-l //ip/share /mnt
或者
mount.cifs -o codepages=cp936,username=user,password=pw,-l //ip/share /mnt
或者
smbmount -o username=user,password=pw,-l //ip/share /mnt (这个命令rhel5以后没有了)

回答3:

moun -o user=0(你的windows用户名)[,password=(对应用户的密码)] //192.168.1.160/share /mnt/winc
这里我用的简写去了-t,加上了密码。你可以去掉[]里面的。