2

I recently got my new Dell laptop with Ubuntu pre-installed. However, I accidentally skipped the first time setup, where you usually configure things like timezone and user(s). So now on boot I only have guest session available. So my question is: can I rerun the first time setup? If not, how can I add a user?

I followed advice of this question (How do I reset a lost administrative password?) and managed to create a user, but I cannot login in DE with it as it does not have home directory and probably something else.

I am using Ubuntu 16.10.

Mikhail
  • 143

2 Answers2

3

After login as root you should use the command adduser <username>, that will create a new user, home directory for it, etc. Alternatively when the user is already created you can create its home directory manually:

mkdir /home/<username>               # Make the user's home directory
cp /etc/skel/* /home/<username>/     # Copy the content of the skeletal dirirectory
chown -R <username>:<username> /home/<username> # Change the ownership

Finally you must add this user to the sudo group, thus it will have administrator's (root's) privileges - you can use either: usermod -a -G sudo <username> or adduser <username> sudo.

pa4080
  • 30,621
0

You could use Ubuntu Live version to boot your laptop, chroot to your system installed on laptop and then add new user. - For the first part use this tutorial: https://help.ubuntu.com/community/LiveCdRecovery - For the second part look here (add user from command line section): https://help.ubuntu.com/community/AddUsersHowto

mariaczi
  • 419