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. Shell编程基础篇-上

    1.1 前言 1.1.1 为什么学Shell Shell脚本语言是实现Linux/UNIX系统管理及自动化运维所必备的重要工具, Linux/UNIX系统的底层及基础应用软件的核心大都涉及Shell脚 ...

  2. 利用 John the Ripper 破解用户登录密码

    一.什么是 John the Ripper ? 看到这个标题,想必大家都很好奇,John the Ripper 是个什么东西呢?如果直译其名字的话就是: John 的撕裂者(工具). 相比大家都会觉得 ...

  3. 作业七:Linux内核如何装载和启动一个可执行程序

    作业七:Linux内核如何装载和启动一个可执行程序 一.编译链接的过程和ELF可执行文件格式 可执行文件的创建——预处理.编译和链接 在object文件中有三种主要的类型. 一个可重定位(reloca ...

  4. sring引入mybatis

    1.首先框架结构是这样的(jar包还是要导的) 2.web.xml和springMVC-servlet.xml未作任何新的配置,这里简单贴一下代码: <?xml version="1. ...

  5. cglib 动态代理

    JDK的动态代理比较慢,可以使用cglib的代理,速度比较快: package cn.demo02; import java.lang.reflect.Method; import java.util ...

  6. Sprint会议计划

    经过饭后的宿舍激烈会议之后...... 1.我们的MASTER是组员董大为 2.这次sprint的目标是四则运算系统 3.每天例会时间地点:每天晚饭后在宿舍 4.实现四则运算的基本功能前期已经完成得差 ...

  7. html之间传递参数

    转自:http://blog.163.com/yangzhanghui_job/blog/static/179575062201271624839972/ aa.html 往 bb.html 传参 a ...

  8. 如何将数据库引擎配置为侦听多个 TCP 端口

    SQL Server 2005         为 SQL Server 启用 TCP/IP 后,数据库引擎将侦听连接点上是否有传入的连接(由 IP 地址和 TCP 端口号组成).下列步骤将创建一个表 ...

  9. Oracle 使用PLSQL 导出 一个表的insert 语句

    1. 使用工具 plsql . GUI的方法,如图示 2. 操作界面 3. 然后就看到了插入语句

  10. 手动安装ettercap的过程

    知乎推送了一个中间人攻击的软件 ettercap 想着尝试进行一下安装学习, 如果有机会的话安全测试部分应该用的到. 1. 下载: wget https://codeload.github.com/E ...