Home > OS >  Ubuntu add user permissions problem solving
Ubuntu add user permissions problem solving

Time:04-21

Process: I made a ubuntu mirror, used in the process of making the modified files added in the form of a user, including the user name is added to the/etc/passwd (such as add a user is zusr) do,/etc/groups increased lh-zd user group, and the zusr users go to lh-zd user groups, (here I don't have to manually add the mkdir user's home directory)
: in use process, I found zusr cannot use sudo command, then I put the inside of the/etc/groups sudo: x: 27 changed to sudo: x: 27: zusr, so that you can use the sudo command, but later found a big bug, after login without user's home directory, I use sudo mkdir added a/home/zusr folder, I in the folder under a series of operations, no authority, must be sudo to operation,
for help: on this question I was searching for a long time, didn't find the answer, the solution, the great god help me,

CodePudding user response:

Mkdir create directory, although the same name, but not a home directory, and you don't have to owner group permissions changes, so you don't have the corresponding permission is also normal


Need you to manually specify the buyers directory
Step 1: check zusr uid
Id zusr
The second step: to specify the directory
Usermod -d/home/zusr -u uid zusr

Try again operation is completed

CodePudding user response:

Sudo permissions to adjust namely again, you can use the visudo, this is the general way of adjustment
  • Related