PDA

View Full Version : [ubuntu] All users deleted



jkarpago
August 11th, 2008, 10:04 AM
Hi:

I installed proftpd yesterday and then I desinstalled with apt-get remove --purge and since then I have no users in gnome.

I restarted the computer and now I can no enter even to gdm because user GDM does not exist.

How can I fix this problem?
I cannot login as any users because there are no one.

meborc
August 11th, 2008, 10:18 AM
if gdm does not exist then you must have removed something else then proftp :) ... try booting the recovery mode (second line in grub menu), then you are automatically root... install ubuntu-desktop package apt-get install ubuntu-desktop, this will install all packages needed for default ubuntu desktop (including gdm), then add new user and add him to sudoers group

useradd NAME admin EDIT: i might be wrong here... both useradd and adduser should work... but just to be on the safe side, use sisco's advice below!
passwd NAME

sisco311
August 11th, 2008, 10:19 AM
Boot the computer in Recovery Mode and add a new user
from the root shell:

adduser username
add the user to the admin group:

adduser username admin
and reboot:

reboot

sisco311
August 11th, 2008, 10:23 AM
if gdm does not exist then you must have removed something else then proftp :) ... try booting the recovery mode (second line in grub menu), then you are automatically root... install ubuntu-desktop package, this will install all packages needed for default ubuntu desktop (including gdm), then add new user and add him to sudoers group

useradd NAME
passwd NAME

I think the network is not started in single user mode.

/etc/init.d/networking startshould start it.

jkarpago
August 11th, 2008, 08:56 PM
I have tried booting the recovery mode and I get this:

chown: 'root:utmp': invalid user
chown: 'root:tty': invalid user
sulogin: cannot open password database!
segmentation fault
init: rcS-sulogin main process (4160) terminated with status 139

I think this means that there is no user and I can`t do anything at all?