当前位置: 首页 > news >正文

【技术分享】Ubuntu 20.04如何更改用户名

产品简介

本文适用于所有RK3568/RK3588平台产品在Ubuntu 20.04系统上如何更改用户名,本文以IDO-EVB3588开发板为例,在ubuntu20.04系统上修改用户名industio为usernew。

IDO-EVB3588开发板是一款基于RK3588平台的产品。该开发板集成了四核Cortex-A76和四核Cortex-A55 CPU,以及G610 MP4 GPU和6 TOPs算力的NPU。它具有丰富的视频输入输出接口,包括(HDMI-TX/HDMI-RX/eDP1.3/MIPI-DSI/MIPI-CSI)。同时还支持高速通信接口,包括(Enthernet/Pcie3.0/USB3.0/TF卡)。此外,IDO-EVB3588还提供了工业互联接口,包括(RS485/RS232/UART)。

产品特点:

搭载RK3588高性能SOC,集成了四核Cortex-A76和四核Cortex-A55 CPU,主频高达2.4G;

6TOPS AI算力,三核架构,支持int4/int8/int16/FP16/BF16/TF32;

支持H.265/H.264/AV1/VP9/AVS2视频解码, 最高8K60FPS;

支持 H.264/H.265视频编码, 最高8K30FPS;

支持HDMI2.1输出,最高8K@60Hz;

支持HDMI2.0 输入, 最高4K60FPS;

支持多摄像头输入;

双通道LVDS,支持到1080P@60Hz 大屏幕 ;

多屏异显;

两路独立的千兆以太网口,支持WAN口+LAN口 双IP ;

5G/4G/WIFI/蓝牙无线通信;

板载4路USB3.0,2路全功能Type-C;

支持Android 12/Debian10/Ubuntu20 /Buildroot  /麒麟OS /OpenHamoney;

图片

图片

一.更改用户名称

1.修改前需要以root用户登录:

Ubuntu 20.04.5 LTS Industio ttyFIQ0Industio login: root
Password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.110 aarch64)* Documentation: https://help.ubuntu.com
root@Industio:~#

2.开始修改用户名:

root@Industio:~# usermod -l usernew industio
root@Industio:~# groupmod -n usernew industio
root@Industio:~# usermod -d /home/usernew -m usernew

3.修改完成后即可使用新用户名登录(登录密码还是之前用户industio的密码:industio):

root@Industio:~# exit
logoutUbuntu 20.04.5 LTS Industio ttyFIQ0Industio login: usernew
Password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.110 aarch64)* Documentation: https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/advantageThis system has been minimized by removing packages and content that are
not required on a system that users do not log into.To restore this content, you can run the 'unminimize' command.* Introducing Expanded Security Maintenance for Applications.Receive updates to over 25,000 software packages with yourUbuntu Pro subscription. Free for personal use.https://ubuntu.com/proExpanded Security Maintenance for Applications is not enabled.0 updates can be applied immediately.Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro statusThe list of available updates is more than a week old.
To check for new updates run: sudo apt update
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settingsLast login: Mon Jul 3 10:42:41 CST 2023 on ttyFIQ0
usernew@Industio:~$

二.添加sudo权限

1.以root用户登录,修改/etc/sudoers配置文件,添加usernew用户名

root@Industio:~# chmod u+w /etc/sudoers
root@Industio:~# vi /etc/sudoers
...
# User privilege specification
root ALL=(ALL:ALL) ALL
usernew ALL=(ALL:ALL) ALL
...
root@Industio:~# chmod u-w /etc/sudoers

2.退出root登录,使用usernew用户登录测试sudo权限

root@Industio:~# exit
logoutUbuntu 20.04.5 LTS Industio ttyFIQ0Industio login: usernew
Password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.110 aarch64)
...
usernew@Industio:~$ sudo apt-get update
[sudo] password for usernew:
Reading package lists... Done
...

三.修改hosts和hostname

1.修改hosts:

usernew@Industio:~$ sudo vi /etc/hosts
127.0.0.1 localhost
127.0.1.1 usernew

2.修改hostname:

usernew@Industio:~$ sudo vi /etc/hostname
Usernew

3.重启设备,登录提示信息变为"Usernew login",且登录成功后命令行前缀变为"usernew@Usernew:~$":

Usernew login: usernew
Password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.110 aarch64)
...
usernew@Usernew:~$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos

四.修改用户密码

usernew用户登录,通过passwd命令修改密码:

usernew@Usernew:~$ passwd usernew
Changing password for usernew.
Current password:
New password:
Retype new password:
passwd: password updated successfully

五.修改默认桌面登陆用户

1.更改用户名后需同步修改默认桌面登录用户,否则开机无法进入桌面

usernew@Usernew:~$ sudo vi /etc/gdm3/custom.conf
...
AutomaticLoginEnable=True
AutomaticLogin=usernew
...

2.修改后重启设备,即可正常进入桌面

至此,在ubuntu20.04上更改用户名完成!

http://www.lryc.cn/news/289761.html

相关文章:

  • LabVIEW振动信号分析
  • 清理Docker环境
  • oracle等保测评
  • x-cmd pkg | go - Google 开发的开源编程语言
  • 32个Java面试必考点-09(下)MySQL调优与最佳实践
  • 优思学院|精益管理如何判定哪些活动是增值或非增值?
  • 详解操作系统各章大题汇总(死锁资源分配+银行家+进程的PV操作+实时调度+逻辑地址->物理地址+页面置换算法+磁盘调度算法)
  • 用ASM HEMT模型提取GaN器件的参数
  • github ssh ssh-keygen
  • 响应式Web开发项目教程(HTML5+CSS3+Bootstrap)第2版 例5-2 JavaScript 获取HTML元素对象
  • 微信实现如何批量自动添加好友?
  • vue3+echarts绘制某省区县地图
  • MyBatis详解(2)-- mybatis配置文件
  • 蓝桥杯备战——8.DS1302时钟芯片
  • freeRTOS / day02
  • Ubuntu 18.04 x86_64 上交叉编译 boost 库(ARMv7L)
  • 为什么 FPGA 比 CPU 和 GPU 快?
  • js常用函数总结
  • cartographer离线建图报错:data_.trajectory_nodes.SizeOfTrajectoryOrZero
  • 【YOLO系列算法俯视视角下舰船目标检测】
  • python进程间使用共享内存multiprocessing.shared_memory来通讯
  • 经典目标检测YOLO系列(三)YOLOv3的复现(2)正样本的匹配、损失函数的实现
  • 编程笔记 html5cssjs 061 JavaScrip简介
  • 计算机网络 第5章(运输层)
  • pythonSM4加密
  • JSP在线阅读系统myeclipse定制开发SQLServer数据库网页模式java编程jdbc
  • el-date-picker设置default-time的默认时间
  • List集合根据对象某个元素去重
  • QML Qt4版本移植到Qt5概述
  • 【极数系列】Flink环境搭建Linux版本 (03)