zoukankan      html  css  js  c++  java
  • ubuntu ssh 与 Samba安装

    ssh

      安装:sudo apt-get install openssh-server

      确认sshserver是否启动:ps -aux | grep ssh(/etc/init.d/ssh start,如果看到sshd那说明ssh-server已经启动了。)

        root 13597 0.0 0.1 61384 1256 ? Ss 03:12 0:00 /usr/sbin/sshd -D

        root 13622 0.0 0.1 109804 1728 ? Ss 03:12 0:00 sshd: malphite [priv]

        malphite 13666 0.0 0.2 109804 2036 ? S 03:12 0:00 sshd: malphite@pts/2
        malphite 18184 15.0 0.2 15944 2080 pts/0 S+ 17:56 0:00 grep --color=auto ssh

      参阅:http://www.linuxidc.com/Linux/2013-07/87368.htm

    samba

      安装:sudo apt-get install samba

         sudo apt-get install smbclient

      Samba服务器的启动、关闭和重启:

        启动Samba服务器只需执行如下命令:
        #sudo /etc/init.d/samba start

        关闭Samba服务器:
        #sudo /etc/init.d/samba stop

        重新启动Samba服务器:
        #sudo /etc/init.d/samba restart

      启动Samba服务器后,可以使用ps命令查看进程:
      #ps -aux | grep smbd

      3. 配置Samba服务

      Samba服务器主要配置文件为/etc/samba/smb.conf,并且可以将NetBIOS名与主机的对应关系写在/etc/samba /lmhosts文件中。

      (1)在Windows系统中不用输入密码访问Linux共享目录
      在Linux共享一个目录,将建立好的目录的设置信息写入/etc/smb.conf文件即可。如:若共享/home/myth/share目录,要在 Windows系统中访问这个共享的目  录,假设Windows主机的IP为192.168.0.11,Linux主机的IP为192.168.10,进行 如下操作:
      #mkdir /home/myth/share
      sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak       //修改配置文件之前最好做个备份
      #vim /etc/samba/smb.conf   
      或者使用 sudo gedit /etc/samba/smb.conf 打开配置文件
      将文件中的内容做如下相应修改:
      #security=user 后面添加:
      security=share
      在文件结尾添加如下行:
      [share]
      comment=this is Linux share directory
      path=/home/myth/share
      public=yes
      writable=yes

      保存退出,启动Samba服务:
      #/etc/init.d/samba start

      设置完成!

      在Windows 下访问共享目录,可点击运行,输入
      \\192.168.0.10\share

      这样就能以匿名用户访问共享目录share了。

      关于Windows下无写权限:chmod -R go+rwx share/

      参阅:http://www.linuxidc.com/Linux/2011-07/38996.htm

  • 相关阅读:
    【Visual C++】游戏开发笔记之六——游戏画面绘图(三)透明特效的制作方法
    【不定期更新】游戏开发中的一些良好习惯与技术技巧
    【Visual C++】游戏开发笔记之七——基础动画显示(一)定时器的使用
    【超级经典】程序员装B指南(转)
    Gentoo安装小记
    图形学中的贴图采样、走样与反走样等
    面试题之银行业务调度系统
    四川雅安芦山加油挺住
    ZOJ 3223 Journey to the Center of the Earth
    android中ListView拖动时背景黑色的问题
  • 原文地址:https://www.cnblogs.com/Malphite/p/7421376.html
Copyright © 2011-2022 走看看