Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Console Foundations Users and Permissions Creating Users

Can't create a user 'mike' because console tell me that it is already exist ? Problem Solved )

Hi, I have a problem. After printing "sudo adduser mike" and pressing enter, adduser told me that user "mike" already exist. What I'm doing wrong ? Thank You

4 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

From Teacher's Note.

Before getting started, or if you are revisiting this video, use the following command to prepare your system to create a new user.

curl -L trhou.se/patch01 | bash

If you receive an error when creating a new user stating that mike is already a user, the above command will remove the user so you can create him again.

Thank You I redid this part, and the issue got resolved.

Thank you for answers, I tried another name option as mike1, after this everything is started working as it shown on video.

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

Lada Rodzhers yes, if you look at the content of the script.

#!/bin/bash                                                                                                                                                    

echo "==========================================================="                                                                                             
echo "=  We are about to ask for your password                  ="                                                                                             
echo  -e "=  The default password is \033[38;5;81mmike the frog\033[0m                  ="                                                                     
echo "==========================================================="                                                                                             

# This removes the user mike if exists                                                                                                                         

sudo -k                                                                                                                                                        
sudo -- sh -c "/bin/rm -r /home/mike ; /usr/sbin/deluser mike" &> /dev/null                                                                                    

echo "==========================================================="                                                                                             
echo "=  Update Successful !                                    ="                                                                                             
echo "==========================================================="

All it does is to remove the mike user, which solves the problem that prevents you from creating a new user mike; but you don't need this script if you're creating a new user account with a username other than mike.

Shane Meikle
Shane Meikle
13,188 Points

Have you tried entering a username that wasn't Mike to see if the error would follow that as well?