change username on ubuntu.
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 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.的更多相关文章
- Linux & change username & computer name & .bashrc
Linux & change username & computer name ubuntu change username and computer name https://ask ...
- change Username for SVN(Subclipse) in Eclipse
Subclipse does not own the information about users and passwords (credentials), so there is no way f ...
- How to change Linux Terminal display username
How to change Linux Terminal display username 如何更改 Linux Terminal 显示的用户名 (base) ➜ ~ whoami xgqfrms-m ...
- 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 ...
- CENTOS/UBUNTU一键安装IPSEC/IKEV2 VPN服务器
1.在azure上创建ubuntu虚拟机 选择v15.04 server 版本 2.添加端口号 3.远程桌面到ubuntu 命令行 输入 sudo su 输入创建 ubuntu虚拟机 时候的 密码 ...
- ubuntu修改用户名并修改home对应的目录名
1.新建一个新的用户user2 sudo adduser temporary sudo adduser temporary sudo 2.从user1 logout.进入新建用户user2,修改use ...
- Ubuntu中一次更改用户名带来的连锁反应
我是一个ubuntu新手,接触ubuntu半年不到,装系统的时候输入了一个用户名,但是最近突然想更名了,这是悲剧的开始! google:ubuntu change username等相关的关键字,最终 ...
- 出错信息: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 ...
- 怎样在OpenStack上安装Ubuntu系统
转载请注明出处,否则将追究法律责任http://blog.csdn.net/xingjiarong/article/details/47011893 OpenStack是一个Iaas即基础即服务的云架 ...
随机推荐
- 【精】【入门篇】js正则表达式
前言 最近有了点时间,就回头看了一下<学习正则表达式>这本书.怎么说呢,这本书适合从零开始学习正则表达式或者有一点基础但是想要加强这方面能力的读者.这本书的风格是“实践出真知”,使用归纳方 ...
- mysql 通过慢查询日志查写得慢的sql语句
MySQL通过慢查询日志定位那些执行效率较低的SQL 语句,用--log-slow-queries[=file_name]选项启动时,mysqld 会写一个包含所有执行时间超过long_query_t ...
- Bash 中常见的字符串操作
获取字符串长度 ${#string} MyString=abcABC123ABCabc 注意这会自动去掉字符串结尾处的空格,如果在字符串中包含空格(开头.中间或结尾),就需要使用引号把字符串包裹起来: ...
- mysql下批量清空某个库下的所有表(库不要删除,保留空库)
总所周知,mysql下要想删除某个库下的某张表,只需要切换到该库下,执行语句"drop table tablename"即可删除!但若是该库下有成百上千张表,要是再这样一次次执行d ...
- linux书籍
<鸟哥私房菜-基础版> <实战LINUX_SHELL编程与服务器管理> <LINUX命令行与SHELL脚本编程大全第2版].布卢姆.扫描版> <Linux初学 ...
- Echarts中graph类型的运用求教
以下是百度Echarts官网上关系图的源码,但是这个关系图的node节点和edge都是静态文件里规定好的,我现在想动态实现,点击其中一个节点A然后新产生一个新节点B,并且有A和B之间的edge,就类似 ...
- java计算器项目
简单的java计算器项目 题目:java计算器项目 一. 题目简介: 一个能进行加减乘除四则运算的小程序 Github链接:https://github.com/lizhenbin/test/tr ...
- githup地址
githup地址:https://github.com/caowenjing/test.git
- 使用git命令创建分支到团队项目
背景 在我们的团队中,我作为管理者,创建了一个叫HelloWorld的项目,大家各自在本地进行开发,将自己的工作贡献到我们的团队项目中.为了便于审核,我希望大家先将自己的贡献先放在属于自己的一个分支上 ...
- 二维数组转化为一维数组 contact 与apply 的结合
将多维数组(尤其是二维数组)转化为一维数组是业务开发中的常用逻辑,除了使用朴素的循环转换以外,我们还可以利用Javascript的语言特性实现更为简洁优雅的转换.本文将从朴素的循环转换开始,逐一介绍三 ...