Ubuntu下的重要的3个问题:ssh、ftp、权限的配置
来源:互联网 发布:编程语言进化 编辑:程序博客网 时间:2024/05/16 19:16
1. SecureCRT通过SSH服务登录ubuntu出错:权限拒绝!
则通过管理员root账号登录后,进入etc/ssh/sshd_config文件中修改
PermitRootLogin yes
修改后进入etc/init.d/目录下刷新:
root@VM-134-166-ubuntu:/etc/init.d# ./ssh restart
在etc/vsftpd.conf文件中:
write_enable=YES
anonymous_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
然后刷新:
service vsftpd restart
这样就ok了
3.普通用户获取管理员权限
方法(1): 修改 /etc/sudoers 文件,找到下面一行,在root下面添加一行,如下所示:修改后重启服务器
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
tommy ALL=(ALL) ALL
修改完毕,现在可以用tommy帐号登录,然后用命令 su - ,即可获得root权限进行操作。
方法(2): 修改 /etc/passwd 文件,找到如下行,把用户ID修改为 0 ,如下所示:修改后重启服务器
tommy:x:500:500:tommy:/home/tommy:/bin/bash
修改后如下tommy:x:0:500:tommy:/home/tommy:/bin/bash
保存,用tommy账户登录后,直接获取的就是root帐号的权限。
友情提醒:虽然方法(2)看上去简单方便,但一般不推荐使用,推荐使用方法(1),但是(1)不行时就用(2)吧
则通过管理员root账号登录后,进入etc/ssh/sshd_config文件中修改
PermitRootLogin yes
修改后进入etc/init.d/目录下刷新:
root@VM-134-166-ubuntu:/etc/init.d# ./ssh restart
2.ubuntu中安装ftp插件并使用
安装:
apt-get install vsftpd
(卸载:apt-get remove --purge vsftpd)
在etc/vsftpd.conf文件中:
write_enable=YES
anonymous_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
然后刷新:
service vsftpd restart
这样就ok了
3.普通用户获取管理员权限
方法(1): 修改 /etc/sudoers 文件,找到下面一行,在root下面添加一行,如下所示:修改后重启服务器
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
tommy ALL=(ALL) ALL
修改完毕,现在可以用tommy帐号登录,然后用命令 su - ,即可获得root权限进行操作。
方法(2): 修改 /etc/passwd 文件,找到如下行,把用户ID修改为 0 ,如下所示:修改后重启服务器
tommy:x:500:500:tommy:/home/tommy:/bin/bash
修改后如下tommy:x:0:500:tommy:/home/tommy:/bin/bash
保存,用tommy账户登录后,直接获取的就是root帐号的权限。
友情提醒:虽然方法(2)看上去简单方便,但一般不推荐使用,推荐使用方法(1),但是(1)不行时就用(2)吧
阅读全文
0 0
- Ubuntu下的重要的3个问题:ssh、ftp、权限的配置
- Ubuntu下FTP服务器的配置
- ubuntu下ftp的安装和配置
- Ubuntu下FTP服务器的配置
- ubuntu下ftp服务器的配置
- ubuntu下ftp服务器的配置
- ubuntu下ftp服务器的配置
- Ubuntu 下ftp服务器的安装配置
- Ubuntu 下ftp服务器的安装配置
- ubuntu下ftp服务器的配置
- ubuntu下ftp服务器的配置
- Ubuntu下配置ftp的服务
- 一些ubuntu下的ftp问题
- ubuntu下的ssh安装配置
- Ubuntu下samba ssh的配置
- redhat下ssh,telnet,ftp服务的配置
- 碰到Ubuntu下SSH安装的问题
- ubuntu下解决安装ssh的问题
- Andoid 获取网络资源 PullParser(Pull解析xml文件)
- POJ
- Maven部署war包到远端tomcat
- PAT(Basic Level)_1030_完美数列
- 2017山东省-D-Hex
- Ubuntu下的重要的3个问题:ssh、ftp、权限的配置
- 网络编程最佳实践一
- href="#"与href="javascript:void(0)"的区别
- 数据库备份数据的最佳方式
- Windows批处理笔记
- RB树(红黑树)插入以及删除
- codevs 1036 商务旅行 (LCA)
- 迪米特法则(Law of Demeter)
- hello csdn