root password BBB ubuntu

Hi,

After installing ubuntu console on BBB from here: http://elinux.org/BeagleBoardUbuntu#Trusty_14.04 and connecting with Putty

login as: ubuntu
ubuntu@192.168.7.2’s password:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.8.13-bone63 armv7l)

  • Documentation: https://help.ubuntu.com/
    Last login: Wed Aug 13 18:11:23 2014 from 192.168.7.1
    ubuntu@arm:~$ sudo passwd root
    [sudo] password for ubuntu:

what is the [sudo] password, root password?

How can I login as root? change password for root?

Jan

It's ubuntu, by "default" there is no "root" user..

This is the way ubuntu has been since 2006, if you want a root user
you need to enable/create it.

Regards,

second link if you would have searched google..

http://askubuntu.com/questions/44418/how-to-enable-root-login

Regards,

Hi,

I did follow the exact link, but the instruction given do not work.

First question:
what would i type after: sudo apt-get update, when asked for password? (tried nothing, root, … temppwd - nothing works)

login as: ubuntu
ubuntu@192.168.7.2’s password:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.8.13-bone63 armv7l)

  • Documentation: https://help.ubuntu.com/
    Last login: Wed Aug 13 17:36:43 2014 from 192.168.7.1
    ubuntu@arm:~$ sudo apt-get update
    [sudo] password for ubuntu:
    Sorry, try again.
    [sudo] password for ubuntu:

Second question:
The instruction at the link says:

Enabling

To actually enable root logins first you have to set a password for the root account and then unlock the locked root account. If you don’t set a password for the root account the passwd command will return

passwd: unlocking the password would result in a passwordless account.  

So, rirst execute in a terminal

sudo passwd root

you will prompted for a new Unix password. Write it twice(second for confirmation).

Then execute

sudo passwd -u root 

to unlock the account. This should return

passwd: password expiry information changed

From theory to reality:

ubuntu@arm:~$ sudo passwd root
[sudo] password for ubuntu:

??? what now?

Jan


Hi,

I did follow the exact link, but the instruction given do not work.

First question:
what would i type after: sudo apt-get update, when asked for password?
(tried nothing, root, ... temppwd - nothing works)

"temppwd" it's been that for over 5 years by default.. You changed something...

login as: ubuntu
ubuntu@192.168.7.2's password:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.8.13-bone63 armv7l)

* Documentation: https://help.ubuntu.com/
Last login: Wed Aug 13 17:36:43 2014 from 192.168.7.1
ubuntu@arm:~$ sudo apt-get update
[sudo] password for ubuntu:
Sorry, try again.
[sudo] password for ubuntu:

Second question:
The instruction at the link says:

Enabling

To actually enable root logins first you have to set a password for the root
account and then unlock the locked root account. If you don't set a password
for the root account the passwd command will return

passwd: unlocking the password would result in a passwordless account.

So, rirst execute in a terminal

sudo passwd root

you will prompted for a new Unix password. Write it twice(second for
confirmation).

Then execute

sudo passwd -u root

to unlock the account. This should return

passwd: password expiry information changed

From theory to reality:

ubuntu@arm:~$ sudo passwd root
[sudo] password for ubuntu:

Regards,

I’m using the prebuilt image

Get prebuilt image:

wget [https://rcn-ee.net/deb/flasher/trusty/BBB-eMMC-flasher-ubuntu-14.04-console-armhf-2014-08-13-2gb.img.xz](https://rcn-ee.net/deb/flasher/trusty/BBB-eMMC-flasher-ubuntu-14.04-console-armhf-2014-08-13-2gb.img.xz)

from here http://elinux.org/BeagleBoardUbuntu#Trusty_14.04
Can you provide a link to another one, maybe I will have more luck then?

Jan

That was the "v2014.08" release, user and password where setup as:

https://github.com/RobertCNelson/omap-image-builder/blob/v2014.08/configs/rcn-ee_console_ubuntu_stable_armhf.conf#L26

Regards,

Robert,

I did again an eMMC flasher and now temppwd works, but still unable to login as root

login as: ubuntu
ubuntu@192.168.7.2’s password:
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.8.13-bone63 armv7l)

  • Documentation: https://help.ubuntu.com/
    Last login: Tue Oct 14 01:04:07 2014 from 192.168.7.1
    ubuntu@arm:~$ sudo passwd root
    [sudo] password for ubuntu:
    Sorry, try again.
    [sudo] password for ubuntu:
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated successfully
    ubuntu@arm:~$ sudo passwd -u root
    passwd: password expiry information changed.
    ubuntu@arm:~$

login as: root
root@192.168.7.2’s password:
Access denied
root@192.168.7.2’s password:

Any hints?

Jan

Well, did you reconfigure sshd to allow root access? root over ssh is
a serious security hole and is NOT enabled by default in
openssh-server..

Couple hints here:

http://lmgtfy.com/?q=ubuntu+allow+root+ssh

Regards,

Sound like someone needs to take their time to learn the OS(es) they’re using. Basically this is Debian / Ubuntu 101, and you should seek information / guidance in those channels. And not bother Robert with such basic questions . . .

This is what I personally think anyway.

"In theory, there is no difference between theory and practice. But, in practice, there is. "

I have modified the file /etc/ssh/sshd_config according to http://askubuntu.com/questions/469143/how-to-enable-ssh-root-access-on-ubuntu-14-04,
but still no root access through ssh.

Package generated configuration file

See the sshd_config(5) manpage for details

What ports, IPs and protocols we listen for

Port 22

Use these options to restrict which interfaces/protocols sshd will bind to

#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2

HostKeys for protocol version 2

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

Lifetime and size of ephemeral version 1 server key

KeyRegenerationInterval 3600
ServerKeyBits 1024

Logging

SyslogFacility AUTH
LogLevel INFO

Authentication:

LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

Don’t read the user’s ~/.rhosts and ~/.shosts files

IgnoreRhosts yes

For this to work you will also need host keys in /etc/ssh_known_hosts

RhostsRSAAuthentication no

similar for protocol version 2

HostbasedAuthentication no

Uncomment if you don’t trust ~/.ssh/known_hosts for RhostsRSAAuthentication

#IgnoreUserKnownHosts yes

To enable empty passwords, change to yes (NOT RECOMMENDED)

PermitEmptyPasswords no

Change to yes to enable challenge-response passwords (beware issues with

some PAM modules and threads)

ChallengeResponseAuthentication no

Change to no to disable tunnelled clear text passwords

#PasswordAuthentication yes

Kerberos options

#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

GSSAPI options

#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

Allow client to pass locale environment variables

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

Set this to ‘yes’ to enable PAM authentication, account processing,

and session processing. If this is enabled, PAM authentication will

be allowed through the ChallengeResponseAuthentication and

PasswordAuthentication. Depending on your PAM configuration,

PAM authentication via ChallengeResponseAuthentication may bypass

the setting of “PermitRootLogin without-password”.

If you just want the PAM account and session checks to run without

PAM authentication, then enable this but set PasswordAuthentication

and ChallengeResponseAuthentication to ‘no’.

UsePAM yes

finally solved

With every Ubuntu version I have used, there is a root user just that a password is not set for it during install as is the case with other distros.

At no stage do you need to do "useradd root".

login as ubuntu
"sudo su" and give the ubuntu passwd "temppwd"
"passwd root" and set the root password.
Regards
Sid.

Sid, if you’ve ever used Ubuntu, then you should already know what Robert is saying. Root by default on Ubuntu is disabled. That does not mean there is no root account, it means the root account is DISABLED.

To boot, information about this is all over the web, one simple google search would have provided more than enough information to figure the problem out . . .

Hi William,
I was puzzled by what Robert wrote which I thought could be confusing to a new user.
It was just the wording.

It happens - many a time professionally I have had the shock horror of discovering that what I thought I had very clearly stated in presentations, documentation and tutorials was totally misinterpreted and enshrined in customers' official documents when they asked me to review them.
Regards
Sid.