You are not logged in.

#1 2009-10-01 13:59:26

piotr
Member
Registered: 2008-01-26
Posts: 58

{Solved} any way to recover deleted user

Hi,
I had comitted a terible mistake. I have deleted user with userdel (name) command and now I cannot access my home directory. Permission denied.
I can access it as root, so no problem, all the files are there. But, is there any way to recover the deleted user, so I can access my home directory as normal user? A help will be very much appreciated.

Last edited by piotr (2009-10-01 23:01:10)

Offline

#2 2009-10-01 14:00:01

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: {Solved} any way to recover deleted user

What about adding it again?


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#3 2009-10-01 14:01:22

piotr
Member
Registered: 2008-01-26
Posts: 58

Re: {Solved} any way to recover deleted user

It does not work. I get the message that the home directory already exists.

Offline

#4 2009-10-01 14:04:59

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: {Solved} any way to recover deleted user

Well then, just rename the home folder, re-create your user then move all the data back to the proper home folder.


what goes up must come down

Offline

#5 2009-10-01 14:10:05

clmates
Member
From: A Coruña - España
Registered: 2009-04-25
Posts: 79

Re: {Solved} any way to recover deleted user

Hi.

piotr wrote:

It does not work. I get the message that the home directory already exists.

pass the -M option to useradd to avoid creating user home directory

pass the -u option to specify the user ID to use, look at this with ls -alln /home/ then you should see the uid number side to your old home dir


-

Arch64 - Acer AX3950 - i5-650 3.2 GHz - 8 GB RAM - Nvidia GeForce 320 1 GB Ram
Arch32 - Samsung NC10 - 2 GB Ram

Offline

#6 2009-10-01 23:00:44

piotr
Member
Registered: 2008-01-26
Posts: 58

Re: {Solved} any way to recover deleted user

Done. Thanks a lot. Arch community is really great.

Offline

#7 2009-10-01 23:12:57

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: {Solved} any way to recover deleted user

piotr wrote:

Done. Thanks a lot. Arch community is really great.

We know, we are so awesome!
*runs for tacos*


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

Board footer

Powered by FluxBB