The officially official Devuan Forum!

You are not logged in.

#1 2023-08-26 21:17:24

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 88  

[SOLVED] I had to remove my own user and add it back, what do I do now?

Do I need to add it back to it's user group?

Offline

#2 2023-08-26 22:19:19

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,427  

Re: [SOLVED] I had to remove my own user and add it back, what do I do now?

If you used 'adduser' to create the user, the primary group of the same name will be created at the same time. The user will also be added to the users group but will not be added to other groups unless you made some changes to the EXTRA_GROUPS settings in /etc/adduser.conf.

id <username> will show you what groups a user belongs to.

Offline

#3 2023-08-27 16:16:27

chris2be8
Member
Registered: 2018-08-11
Posts: 266  

Re: [SOLVED] I had to remove my own user and add it back, what do I do now?

*If* you added it back with the *same* UID and GID then everything should work OK. But if not you will have problems.

Did it's home directory change? If not then all the files you had beforehand should be in there. Look at them with ls -al and check they show user and group names in the output.

If not it's possible to chown them to your new id with something like find . -uid 1000 -exec chown chris:chris {} \; (replace 1000 with the old UID, chris:chris with your new userid and group and chown with echo for the first run).

*** WARNING *** I've not tested this, though I've had to do it many years in the past.

Offline

#4 2023-08-29 11:36:00

delgado
Member
Registered: 2022-07-14
Posts: 157  

Re: [SOLVED] I had to remove my own user and add it back, what do I do now?

To own the files again, you may recursively do 'chown' or 'chgrp', e.g.:

sudo chown -R user /path/to/directrory/to/own

Offline

#5 2023-08-29 22:26:08

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 88  

Re: [SOLVED] I had to remove my own user and add it back, what do I do now?

Okay thanks I did id <username> thing and readded my user to all that groups. Marking as solved.

Offline

Board footer