例如我要新建一个nginx用户,并指定目录,允许使用bash登录

sudo useradd -d "/home/nginx" -m -s "/bin/bash" nginx
passwd nginx

passwd用于修改nginx的登录密码

Ubuntu新建用户并指定目录的更多相关文章

  1. CentOS下源码安装vsftpd-3.0.0,并设置指定用户访问指定目录(附带完整配置文件)

    1.卸载系统已经存在的ftp服务器 因为是源码安装,所以不能通过rpm -qa的方式查看是否已经安装ftp服务器,可以通过find / | grep vsftp*方式查看系统中存在哪些与vsftpd相 ...

  2. linux用户登录指定目录

    一.创建用户和用户组 [root@web4 lianyu]# groupadd lianyu [root@web4 lianyu]# useradd lianyu -g lianyu [root@we ...

  3. linux创建ftp用户以及指定目录问题

    linux创建ftp用户以及指定目录问题 创建用户命令:如我的目录是根目录下的 MyWeb 用户名:xdh2571 #useradd -G ftp -d /MyWeb -M xdh2571#passw ...

  4. Ubuntu新建用户并加入SUDO组

    Ubuntu新建用户并加入SUDO组 新建用户: adduser xxxx 加入用户组: usermod -aG sudo username

  5. Ubuntu新建用户

    新建用户的命令是useradd,修改密码是passwd,如下: sudo useradd linc sudo passwd linc 但是问题出现了,home目录下并没有相对应的linc目录. 原来u ...

  6. linux 判断指定用户对指定目录具有的权限

    脚本名:power.sh 脚本内容: ------------------------------------------- 注意:必须以root 身份执行该脚本. 脚本power.sh 需要两个参数 ...

  7. Linux(Ubuntu)新建用户只有一个$问题

    参考自: http://www.cnblogs.com/ylan2009/articles/2321177.html 1.用root登录操作 2.查看/etc/passwd文件中新建用户的权限 有没有 ...

  8. Ubuntu新建用户以及安装pytorch

    环境:Ubuntu18,Python3.6 首先登录服务器 ssh username@xx.xx.xx.xxx #登录一个已有的username 新建用户 sudo adduser username ...

  9. ubuntu新建用户无法登陆

    使用sudo adduser 创建用户,不存在无法登陆问题,如果使用useradd创建用户xx,需要在新建home目录下建立用户目录. 同时,需要修改用户目录的属主,命令:chown xx:xx   ...

随机推荐

  1. 原生ajax解析&封装原生ajax函数

    前沿:对于此篇随笔,完是简要写了几个重要的地方,具体实现细节完在提供的源码做了笔记 <一>ajax基本要点介绍--更好的介绍ajax 1. ajax对象中new XMLHttpReques ...

  2. [Reprint] Difference Between Job, Work, And Career

    https://www.espressoenglish.net/difference-between-job-work-and-career/ A lot of English learners co ...

  3. 使用Xpath+多进程爬取诗词名句网的史书典籍类所有文章。update~

    上次写了爬取这个网站的程序,有一些地方不完善,而且爬取速度较慢,今天完善一下并开启多进程爬取,速度就像坐火箭.. # 需要的库 from lxml import etree import reques ...

  4. springboot+mybatisplus进行整合并且使用逆向工程

    首先引入maven依赖:这是整合mybatisplus时,进行逆向工程时候需要引入的依赖 <!--mybaitsplus start--> <dependency> <g ...

  5. Mybatis容易遇到的问题

    1.MyBatis中#和$的区别? 1.使用#的原理是?占位符,而$的原理为直接字符串拼接方式 2.$方式一般使用在写数据库中的固定字段时候才会使用例如表名或者列名(select * from use ...

  6. [Flutter] Flexible the Widget height to available space

    Let's say you set widget height to 200, but to different screen, there might not be enough space for ...

  7. 1129. Shortest Path with Alternating Colors

    原题链接在这里:https://leetcode.com/problems/shortest-path-with-alternating-colors/ 题目: Consider a directed ...

  8. javascript巧用注释保存html文本结构

    在js中,肯定会遇到js代码里面有html接口的时候,骚年们都有哪些写法? 刚学JS的写法: <script> var strHtml="<div id=\"te ...

  9. js constructor typeOf 区别

    constructor 属性返回对创建此对象的数组函数的引用. 例如:const obj = {a: 1}        console.log(obj.constructor)   // funct ...

  10. Clouds Classification from Sentinel-2 Imagery with Deep Residual Learning and Semantic Image Segmentation

    哨兵2号云检测的语义分割,提出了CloudNet,不使用池化和上采样操作,从头到尾保持原图大小,中间每个块使用ASPP和残差连接,网络结构如下 比较了CNN, FCN, DeeplabV3+,效果都没 ...