Ubuntu系统新增用户

创建用户有两条命令:adduer和useradd,对应着两条删除用户的命令:deluser和userdel。
这两种命令之间的区别:
adduser:会自动为创建的用户指定主目录、系统shell版本,会在创建时输入用户密码。
useradd:需要使用参数选项指定上述基本设置,如果不使用任何参数,则创建的用户无密码、无主目录、没有指定shell版本。
在Ubuntu系统中建议使用adduser命令,比如创建一个openfoam7的用户:

adduser openfoam7

会自动出现:

复制代码
cfdem@DESKTOP-BVOE5IL:/home$ sudo adduser openfoam7
Adding user `openfoam7' ...
Adding new group `openfoam7' (1002) ...
Adding new user `openfoam7' (1002) with group `openfoam7' ...
Creating home directory `/home/openfoam7' ...
Copying files from `/etc/skel' ...
New password:               #####这个地方输入密封
Retype new password:        #####这个地方重新输入密码
passwd: password updated successfully
Changing the user information for openfoam7
Enter the new value, or press ENTER for the default        #####下面的一路回车
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n]
复制代码

 

posted @   希望先生  阅读(177)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
历史上的今天:
2022-04-06 Space Claim创建part体验不佳
点击右上角即可分享
微信分享提示