linux - 一个uid可以对应多个用户名吗?
迷茫
迷茫 2017-04-17 15:17:30
0
5
1450

如果可以如何添加同一uid下的多个用户名?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(5)
大家讲道理

useradd
-u user number specifies the uid. If the -o option is also present, the uid of other users can be reused.

洪涛

Isn’t this design unreasonable? Why does one uid need multiple users? If you want to design it as one account that can add sub-accounts, then the uid is still unique, and you need to add a pid, pointing to the uid of the parent account

巴扎黑

You should build a relationship table, one-to-many
A table:
id uid

B table (relationship table):
A.id userName(1,2...)

迷茫

Yes, the kernel ultimately identifies the user based on uid.

阿神

Wouldn’t it be enough to set each username into a field, such as username1, username2...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!