Without a home directory

sudo useradd myuser

With home directory

sudo useradd -m myuser

Then set the password

sudo passwd myuser

Then set the shell

sudo usermod -s /bin/bash myuser
answered Sep 1 '08 at 18:59
quackingduck

3,08952122
 
    
Simple but very useful answer. Thanks. – Brady Zhu Sep 17 '13 at 5:59
    
unfortunately, I indeed follow this to add a user, and then get the error 'Access denied' when I try to sign in with it. What's wrong with it? – Brady Zhu Sep 17 '13 at 6:03

------------------------

http://stackoverflow.com/questions/38288/how-do-i-add-a-user-in-ubuntu

ubuntu 添加和删除用户的更多相关文章

  1. Ansible 从MySQL数据库添加或删除用户

    mysql_user - 从MySQL数据库添加或删除用户. 概要 要求(在执行模块的主机上) 选项 例子 笔记 状态 支持 概要 从MySQL数据库添加或删除用户. 要求(在执行模块的主机上) My ...

  2. ubuntu 14.04 添加、删除用户,修改用户名称,修改主机名

    ubuntu添加用户 sudo adduser test ubuntu删除用户 sudo userdel test cd /home/ sudo rm -r test

  3. centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法

    修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...

  4. linux (RHEL) 添加和删除用户

    linux添加新用户使用 useradd -----create a new user or update default new user information 删除用户使用userdel  -- ...

  5. mysql、添加和删除用户、添加权限

    创建用户      mysql>insert into mysql.user(Host,User,Password) values("localhost","tes ...

  6. Linux命令之useradd和userdel(添加、删除用户)

    一.[useradd]:添加用户命令 1.作用 useradd或adduser命令用来建立用户帐号和创建用户的起始目录,使用权限是超级用户. 2.格式 useradd [-d home] [-s sh ...

  7. Shell脚本——添加和删除用户

    写一个脚本admin_user.sh,其用法格式为: admin_user.sh --add USERLIST --del USERLIST -v|--verbose -h|--help 其中, -h ...

  8. centos 添加/删除用户和用户组

    centos系统添加/删除用户和用户组     在centos中增加用户使用adduser命令而创建用户组使用groupadd命令,这个是不是非常的方便呀,其实复杂点的就是用户的组与组权限的命令了,下 ...

  9. Ubuntu建立和删除用户

    添加用户: sudo adduser xxx 这样的命令会在home目录下添加一个帐号 sudo useradd xxx 仅仅是添加用户, 不会在home目录添加帐号 删除用户: 在普通用户下:sud ...

随机推荐

  1. tiny4412 busybox制作根文件系统rootfs nfs 挂载 ubuntu 14.04

    http://blog.csdn.net/liudijiang/article/details/50555429(转) 首先得要有制作好的uboot和linux内核镜像zImage,先烧录到sd卡里, ...

  2. 日志logging

    日志: 日志分为5个级别:debug(10),info(20),warning(30),error(40),critical(50) 日志四个组成部分:logger,handler,filter,fo ...

  3. if-else优化

    过多if-else分支的优化   超过3个就应该去优化,说if-else过多的分支可以使用switch或者责任链模式等等方式来优化.确实,这是一个小问题,不过我们还是可以整理一下这个小问题的重构方式. ...

  4. go 本地安装 grpc-go

    https://blog.csdn.net/code_segment/article/details/77461590 https://github.com/grpc/grpc-go git clon ...

  5. 原生js实现 table表格列宽拖拽

    查看效果 <!DOCTYPE html> <html> <head> <meta charset="gbk"> <title& ...

  6. D. Billboard

    D. Billboard Time Limit: 8000ms Case Time Limit: 8000ms Memory Limit: 32768KB   64-bit integer IO fo ...

  7. NYOJ 7 街区最短路径问题

    街区最短路径问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:4   描述 一个街区有很多住户,街区的街道只能为东西.南北两种方向. 住户只可以沿着街道行走. 各个街道之间的间 ...

  8. ubuntu上传项目到github

    https://blog.csdn.net/ajianyingxiaoqinghan/article/details/70544159

  9. Thread.getContextClassLoader() is null

    Java threads created from JNI code in a non-java thread have null ContextClassloader unless the crea ...

  10. 【Android】SharedPreference存储数据

    SharedPreference存储数据 使用SharedPreference保存数据  putString(key,value) 使用SharedPreference读取数据  getString( ...