PDA

View Full Version : [ubuntu] 12.04 installation succesfull but no user created



jy_moustache
July 8th, 2012, 02:54 PM
Hi all,

I've just reinstalled Ubuntu 12.04 on my pc but when I restarted it, there's no user defined : just a guest with no priviledges. So I'm unable to do anything ....

My set-up was a dual boot with vista and Ubuntu 10.04 all starting with Grub nicely. I replaced Ubuntu 10.04 with 12.04 via a full reinstallation.
During the process, I've run into troubles with grub which could not start and gave me a prompt. Probably a MBR error or badly defined boots. I solved this using boot-repair and Ubuntu 12.04 starts just fine.

Problem now is that the installation was supposed to create a user but it didn't. So I end up with a pc which can be administrated only by root (unuseful). :(

Result of
cat /etc/passwd provided below.

I guess there's not much to do here except reinstall but i've tried that already and it didn't work. In other words, i'm afraid I can't use Ubuntu anymore.

Can anyone give me a hand on this one ? I don't know where to start looking ...

Thanks a lot !

jy

Username requested was therockers and here is the result of
cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
syslog:x:101:103::/home/syslog:/bin/false
messagebus:x:102:105::/var/run/dbus:/bin/false
colord:x:103:108:colord colour management daemon,,,:/var/lib/colord:/bin/false
lightdm:x:104:111:Light Display Manager:/var/lib/lightdm:/bin/false
whoopsie:x:105:114::/nonexistent:/bin/false
avahi-autoipd:x:106:117:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
avahi:x:107:118:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
usbmux:x:108:46:usbmux daemon,,,:/home/usbmux:/bin/false
kernoops:x:109:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
pulse:x:110:119:PulseAudio daemon,,,:/var/run/pulse:/bin/false
rtkit:x:111:122:RealtimeKit,,,:/proc:/bin/false
speech-dispatcher:x:112:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
hplip:x:113:7:HPLIP system user,,,:/var/run/hplip:/bin/false
saned:x:114:123::/home/saned:/bin/false
guest-SIsPoF:x:115:124:Guest,,,:/tmp/guest-SIsPoF:/bin/bash

steeldriver
July 8th, 2012, 03:29 PM
Why not try manually adding a user as root from the recovery console before you blow away the entire install?

Do you have existing users / home dirs that you are trying to re-add or is it a completely fresh install? If it's a completely fresh install then you could just do something like

1. remount the root filesystem rw (else even root can't make changes to the /etc/passwd file)

mount -o remount,rw / 2. create a new 'standard' user with whatever skeleton profile is in /etc/skel

adduser user(by default this should also create the user private group and home dir I think)

3. you can either specify additional groups on the adduser command line (--add_extra_groups ?) or add them after it's created - the default for groups for the initial 'sudo' account are adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare I think, so that would be


usermod -aG adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare userYou might want to use an account name other than your usual one - just in case you don't get everything quite right you can create your 'real' user from the graphical tools once you can login on the new account - then just delete the handmade one.

jy_moustache
July 14th, 2012, 01:32 PM
That did the trick !!!
Thanks a lot !!

jy