Below tutorial will show you how to change username in ubuntu 12.04 precise.First,we need login as root the change the username,then restart the enable this changing ,here we go.

1.Open a terminal by Pressing Ctl+Alt+t or search terminal in Dash

2.Unlock account root and enable login as root using below command

sudo passwd root
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf' sudo vi: /etc/lightdm/lightdm.conf:

  autologin-user=root


3.Reboot your computer and login as  root

4.Open a terminal and Use blow command to change your username

usermod  -l newname oldname

5.(Optional)Now you already changed your username,but your home folder name still are “/home/oldname”,if you also want to change /home/oldname to /home/newname just run below command

usermod -m -d /home/newname newname

Note:Of course you can combine step 4 and step 5 using below command

usermod -m -d /home/newname -l newname oldname

6.All done,use below command to lock your root again,then you can reboot and login as your new username

passwd -l root

change username on ubuntu.的更多相关文章

  1. Linux & change username & computer name & .bashrc

    Linux & change username & computer name ubuntu change username and computer name https://ask ...

  2. change Username for SVN(Subclipse) in Eclipse

    Subclipse does not own the information about users and passwords (credentials), so there is no way f ...

  3. How to change Linux Terminal display username

    How to change Linux Terminal display username 如何更改 Linux Terminal 显示的用户名 (base) ➜ ~ whoami xgqfrms-m ...

  4. Fix catalyst driver in Ubuntu 13.04 / 13.10

    Fix catalyst driver in Ubuntu 13.04 / 13.10(墙外文章备份) 1. Introduction I found lots of people strugglin ...

  5. CENTOS/UBUNTU一键安装IPSEC/IKEV2 VPN服务器

    1.在azure上创建ubuntu虚拟机 选择v15.04 server 版本 2.添加端口号 3.远程桌面到ubuntu 命令行 输入 sudo su  输入创建 ubuntu虚拟机 时候的 密码 ...

  6. ubuntu修改用户名并修改home对应的目录名

    1.新建一个新的用户user2 sudo adduser temporary sudo adduser temporary sudo 2.从user1 logout.进入新建用户user2,修改use ...

  7. Ubuntu中一次更改用户名带来的连锁反应

    我是一个ubuntu新手,接触ubuntu半年不到,装系统的时候输入了一个用户名,但是最近突然想更名了,这是悲剧的开始! google:ubuntu change username等相关的关键字,最终 ...

  8. 出错信息:Incorrect string value: '\xE4\xBD\xA0\xE5\xA5\xBD' for column 'username'

    出错信息: java.sql.SQLException: Incorrect string value: '\xE4\xBD\xA0\xE5\xA5\xBD' for column 'username ...

  9. 怎样在OpenStack上安装Ubuntu系统

    转载请注明出处,否则将追究法律责任http://blog.csdn.net/xingjiarong/article/details/47011893 OpenStack是一个Iaas即基础即服务的云架 ...

随机推荐

  1. 分布式监控系统Zabbix3.4-针对MongoDB性能监控操作笔记

    公司在IDC机房的一台服务器上部署了MongoDB,由于所存储的业务数据比较重要,所以对MongoDB的监控显得尤为重要!Zabbix监控MongoDB性能的原理:通过echo "db.se ...

  2. Mysql之binlog日志说明及利用binlog日志恢复数据操作记录

    众所周知,binlog日志对于mysql数据库来说是十分重要的.在数据丢失的紧急情况下,我们往往会想到用binlog日志功能进行数据恢复(定时全备份+binlog日志恢复增量数据部分),化险为夷! 一 ...

  3. linux-镜像下载

    https://blog.csdn.net/sinat_36564972/article/details/81560395 Centos6.5镜像下载 2018年08月10日 11:35:53 深夜搬 ...

  4. NOIP模拟赛20180917 隐藏题目

    给定n个数,值域范围1~n,每个数都不同,求满足所有相邻数不同的排列数.\(n\le 30\). 状压DP很好想,然而我考试时没写出来.对于排列还是有很多转化方法.另外要注意数据范围.

  5. 【软件工程】5.8 黑盒&白盒测试

    代码链接:http://www.cnblogs.com/bobbywei/p/4469145.html#3174062 搭档博客:http://www.cnblogs.com/Roc201306114 ...

  6. ### The error may involve defaultParameterMap ### The error occurred while setting parameters

    Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Query was empty; bad SQL grammar [ ...

  7. 如何把数据快速批量添加到Elasticsearch中

    问题来源 最近新做一个项目,有部分搜索比较频繁的数据,而且量级比较大,预计一两年时间很可能达到100G,项目要求不要存在数据库中,最终出来有两个方案,一个是使用Protocol Buffers存储在文 ...

  8. CentOS7 完整安装后创建私有的yum仓库

    1. 安装 CentOS7 安装的包比较全,应用可以直接用. 2. 第一步创建 yum 包的存放路径 mkdir -p /var/www/html/ 3. 创建私有仓库 createrepo -v / ...

  9. eclipse里面找不到databaseexplorer

    在window==>show view==>Other==>Data Management==>Database explorer配置:在右下方点击Database Sourc ...

  10. Angular factory自定义服务

    <!DOCTYPE html><html ng-app="myApp"><head lang="en"> <meta ...