作者:幽灵-玲 | 来源:互联网 | 2023-09-13 17:30
1addgroupandusersudoaddgrouphadoopgroupsudoadduser-ingrouphadoopgrouphadoop2sudoadd over:a
1 add group and user
sudo addgroup hadoopgroup
sudo adduser -ingroup hadoopgroup hadoop
2 sudo add
over:all command
bochao@ubuntu:~$ sudo addgroup hadoopgroup
[sudo] password for bochao:
Adding group `hadoopgroup' (GID 1001) ...
Done.
bochao@ubuntu:~$ sudo adduser -ingroup hadoopgroup hadoop
Adding user `hadoop' ...
Adding new user `hadoop' (1001) with group `hadoopgroup' ...
Creating home directory `/home/hadoop' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for hadoop
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y
bochao@ubuntu:~$ sudo gedit /etc/sudo*
(gedit:12070): GLib-GIO-WARNING **: Missing callback called fullpath = /root/.local/share/recently-used.xbel
bochao@ubuntu:~$ sudo gedit /etc/sudo*
bochao@ubuntu:~$ su hadoop
Password:
hadoop@ubuntu:/home/bochao$