Ubuntu 新建用户 Shell 命令行显示异常
目录
相关环境
问题描述
问题原因
解决方法
解决方法一
解决方法二
附录
相关环境
问题描述
root@ecszjk:~# useradd test -m
root@ecszjk:~#
root@ecszjk:~#
root@ecszjk:~# su – test
$
$ id
uid=1001(test) gid=1001(test) groups=1001(test)
$
问题原因
$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
…
test:x:1001:1001::/home/test:/bin/sh
解决方法
解决方法一
root@ecszjk:/etc# vim /etc/passwd
解决方法二
root@ecszjk:~#
root@ecszjk:~# usermod test -s /bin/bash
root@ecszjk:~# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
…
test:x:1001:1001::/home/test:/bin/bash
附录
root@ecszjk:/etc# useradd –help
Usage: useradd [options] LOGINuseradd -Duseradd -D [options]
Options:–badnames do not check for bad names-b, –base-dir BASE_DIR base directory for the home directory of thenew account–btrfs-subvolume-home use BTRFS subvolume for home directory-c, –comment COMMENT GECOS field of the new account-d, –home-dir HOME_DIR home directory of the new account-D, –defaults print or change default useradd configuration-e, –expiredate EXPIRE_DATE expiration date of the new account-f, –inactive INACTIVE password inactivity period of the new account-g, –gid GROUP name or ID of the primary group of the newaccount-G, –groups GROUPS list of supplementary groups of the newaccount-h, –help display this help message and exit-k, –skel SKEL_DIR use this alternative skeleton directory-K, –key KEY=VALUE override /etc/login.defs defaults-l, –no-log-init do not add the user to the lastlog andfaillog databases-m, –create-home create the user’s home directory-M, –no-create-home do not create the user’s home directory-N, –no-user-group do not create a group with the same name asthe user-o, –non-unique allow to create users with duplicate(non-unique) UID-p, –password PASSWORD encrypted password of the new account-r, –system create a system account-R, –root CHROOT_DIR directory to chroot into-P, –prefix PREFIX_DIR prefix directory where are located the /etc/* files-s, –shell SHELL login shell of the new account-u, –uid UID user ID of the new account-U, –user-group create a group with the same name as the user-Z, –selinux-user SEUSER use a specific SEUSER for the SELinux user mapping–extrausers Use the extra users database
Ubuntu 新建用户 Shell 命令行显示异常相关推荐
- Ubuntu系统新建用户时终端只显示$符号
Ubuntu系统新建用户时终端只显示$符号 问题:在新建用户的时候切换到新建用户的终端,只是显示$符号. 解决方法: 1.使用命令切换到root用户: $ su root 2.然后使用命令绑定bash ...
- linux shell 宏定义_Linux系统和Shell命令行简介,走上数据分析之路
122Linux系统和Shell命令行简介,走上数据分析之路 本节作者:刘永鑫 中国科学院遗传与发育生物学研究所 版本1.0.2,更新日期:2020年8月31日 本项目永久地址:https://git ...
- 122.Linux系统和Shell命令行简介,走上数据分析之路
122Linux系统和Shell命令行简介,走上数据分析之路 本节作者:刘永鑫 中国科学院遗传与发育生物学研究所 版本1.0.2,更新日期:2020年8月31日 本项目永久地址:https://git ...
- ubuntu 新建用户到指定的目录
一.新建用户 ubuntu新建用户有两个命令,adduser 和 useradd: 1.其中adduser比较方便,直接使用命令:sudo adduser "用户名", 然后设置密 ...
- 快乐的shell命令行
快乐的shell命令行 PART1--基础 1.权限 #超级用户权限 $普通用户 2.复制粘贴 复制:鼠标左键沿着文本拖动高亮的文本被复制到X管理的缓冲区(或者双击一个单词) 粘贴:鼠标中键 3.简单 ...
- 2021年大数据Hadoop(八):HDFS的Shell命令行使用
2021大数据领域优质创作博客,带你从入门到精通,该博客每天更新,逐渐完善大数据各个知识体系的文章,帮助大家更高效学习. 有对大数据感兴趣的可以关注微信公众号:三帮大数据 目录 HDFS的Shell命 ...
- 操作系统课设之简单 shell 命令行解释器的设计与实现
前言 课程设计开始了,实验很有意思,写博客总结学到的知识 白嫖容易,创作不易,学到东西才是真 本文原创,创作不易,转载请注明!!! 本文链接 个人博客:https://ronglin.fun/arch ...
- shell 清楚空格_Cygwin系列(五):Shell命令行初体验
► 本文共5700余字,预计阅读时间15分钟,本文知乎链接:Cygwin系列(五):Shell命令行初体验,本文同步发布于微信公众号. 前一篇文章Cygwin系列(四):一步一步搭建Cygwin最小系 ...
- hbase shell 命令行从入门到放弃
1.启动hbase 进入 hbase bin 目录 ./start-hbase.sh ./当前目录下的start-hbase.sh文件启动 退出hbase shell 命令行 ctrl+c 补充: ...
最新文章
- 读小学的宝宝人缘好,收到同学赠送的小瓶茅台酒!
- [转载]C#中各种计时器
- SAP Spartacus Unit List树形数据的加载
- Chrome 浏览器创建网站快捷方式(加入收藏夹)代码
- java link 使用_Java数据结构之简单的连接点(link)实现方法示例
- linux定时器的实现方法
- 全网首发:成功在loongarch64上编译成功jogamp(提供下载库)
- 计算一条3d空间直线和一个3d空间平面的交点
- Unity3D 退出游戏应用的代码
- JetsonNano跑YoloV3速度评测
- 麦子学院深度学习视频课程(中文授课、代码讲解为主)
- 自动白平衡(AWB)基础
- git 使用过程遇到的问题
- mysql alter index rebuild_Oracle alter index rebuild 说明
- COGS 2815. 天黑请闭眼
- B端页面——详细表格设计流程
- 基于Scala设计简易的会员卡管理系统
- [附源码]计算机毕业设计Python校园运动会管理系统(程序+源码+LW文档)
- 一文看懂用word制作电子公章,2分钟就能搞定!
- 小程序云开发,学习总结