Creating a new User on Udoo Ubuntu

Discussion in 'UDOO 101' started by asvaldr, Oct 18, 2013.

  1. asvaldr

    asvaldr New Member

    Joined:
    Oct 18, 2013
    Messages:
    24
    Likes Received:
    0
    Hi Everyone,

    I'm not a Linux expert and i'm having trouble with creating a user on the UDOO.

    GOAL: I want to create a new administrator user with all the same abilities as the default Ubuntu account.
    So that means auto login, showing up on the lock screen etc....

    What I've tried
    When I use the GUI to create a user; it doesn't get added to the list; but a home folder is made for that user.
    If I use the command line
    Code:
    sudo useradd asvaldr
    It will create the user, although it won't show the user in the GUI utility.
    To login to the user I have from the lock/welcome screen I have to use the "other user" option. These things are really annoying me.

    Also if I changed the udoo accounts password and name it wasn't recognised with the new password on the lock screen . I still had to use the default password.

    Whats the go? Why doesn't the GUI add a user and display it? And then why can't I give it all the same interaction as the default user?

    Thanks in advance.
     
  2. asvaldr

    asvaldr New Member

    Joined:
    Oct 18, 2013
    Messages:
    24
    Likes Received:
    0
    I've now manually added my new user to the /etc/sudoers file.
    This has allowed my new user to act like the ubuntu account in most cases; but the wird thing is now that
    Any GUI application that requires an admin still wants the root user password ubuntu. Why does this not use the current account?
     
  3. ibs

    ibs New Member

    Joined:
    Oct 21, 2013
    Messages:
    2
    Likes Received:
    0
    execute "sudo passwd root" with new account. When it asks for new UNIX password type your new root password and should be good.
     
  4. Xykon

    Xykon Member

    Joined:
    Nov 1, 2013
    Messages:
    64
    Likes Received:
    20
    Instead of adding the new user to the sudoers file, you can use the linux group feature. In this case you use sudo usermod -a -G sudo <username>. This will add the sudo group to the user, which is allowed to use the sudo command. Check out the file /etc/group for a list of all groups on your system.

    If for example you want your user to use the gpios without having to run the sudo command every time, you can use sudo usermod -a -G gpio <username>. To add both gpio and i2c in one go, use sudo usermod -a -G gpio,i2c <username>. The -a means to add whatever groups you specify with the -G option. Without the -a your groups would be replaced with whatever you specify with -G.

    If you look at the /etc/group file, you can see at the end of each group which users belong to that group. As you can see the ubuntu user is added to several groups, so you should also add these to the new user you created.
     
  5. danomatika

    danomatika New Member

    Joined:
    Feb 3, 2014
    Messages:
    8
    Likes Received:
    0
    If you only want to change the default user, you can simply create a new admin user in the System Settings gui and set it to auto login. That worked for me. I then removed the default ubuntu user and everything is working fine.

    At this point, the User Accounts section of the System Settings (gnome-control-center) crashes, but I don't need to get into it now.
     
  6. danomatika

    danomatika New Member

    Joined:
    Feb 3, 2014
    Messages:
    8
    Likes Received:
    0
    Since the User Account gui kept crashing, I followed the Ubuntu LightDM how to and set the new user account to login by default as that setting didn't seem to stay before the gui crashed the first time:

    Code:
    sudo /usr/lib/lightdm/lightdm-set-defaults --autologin username
    Also, you need to add the new user to the same groups the default ubuntu user is part of if you want audio, etc to work. Compare

    Code:
    groups ubuntu
    ubuntu : ubuntu bin disk sudo audio video lightdm intserial ugpio vpu autologin
    
    to

    Code:
    groups newuser
    newuser : newuser
    
    Then you can set the newuser's groups with:

    Code:
    sudo usermod -G bin,disk,sudo,audio,video,lightdm,intserial,ugpio,vpu,autologin newuser
    LightDM will show any users that are part of the lightdm group on the login screen, so that's why the new user you added wasn't there.
     

Share This Page