leJOS 0.8.1 what is the password for lejos user?

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

leJOS 0.8.1 what is the password for lejos user?

Postby esmetaman » Sun Apr 27, 2014 12:21 pm

In leJOS 0.8.1, user menu has a option to execute programs developed by the user and stored in the path:

Code: Select all
/home/lejos/


If I try to connect using a SSH connection, what is the password for the user lejos?
Currently I can't connect using that user, only with root user.

Code: Select all
root@(none):/# ls
bin      dev      home     linuxrc  mnt      proc     sys      usr
boot     etc      lib      media    opt      sbin     tmp      var
root@(none):/# cd home/
root@(none):/home# ls
lejos  root


Example connecting with the user:

Code: Select all
soulFactory:BoR jabrena$ ssh lejos@10.0.1.1
lejos@10.0.1.1's password:
Permission denied, please try again.


Maybe we don't have the user lejos and it is a folder only:

Code: Select all
root@(none):/# cat /etc/passwd
root::0:0:root:/home/root:/bin/sh
daemon:*:1:1:daemon:/usr/sbin:/bin/sh
bin:*:2:2:bin:/bin:/bin/sh
sys:*:3:3:sys:/dev:/bin/sh
sync:*:4:65534:sync:/bin:/bin/sync
games:*:5:60:games:/usr/games:/bin/sh
man:*:6:12:man:/var/cache/man:/bin/sh
lp:*:7:7:lp:/var/spool/lpd:/bin/sh
mail:*:8:8:mail:/var/mail:/bin/sh
news:*:9:9:news:/var/spool/news:/bin/sh
uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:*:13:13:proxy:/bin:/bin/sh
www-data:*:33:33:www-data:/var/www:/bin/sh
backup:*:34:34:backup:/var/backups:/bin/sh
list:*:38:38:Mailing List Manager:/var/list:/bin/sh
irc:*:39:39:ircd:/var/run/ircd:/bin/sh
gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
messagebus:x:42:64002:Linux User,,,:/var/run/dbus:/bin/sh


My idea is to execute a Java Ant process to deploy a user program in the path /home/lejos/ directly
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 295
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: leJOS 0.8.1 what is the password for lejos user?

Postby gloomyandy » Sun Apr 27, 2014 1:05 pm

There is no lejos user.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4171
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: leJOS 0.8.1 what is the password for lejos user?

Postby esmetaman » Sun Apr 27, 2014 2:29 pm

Hi Andy,

in this case, current distro has a utility to add a new user in the system:

Code: Select all
root@(none):/etc# adduser
Tinylogin v1.4 (2010.12.22-01:30+0000) multi-call binary

Usage: adduser [OPTIONS] <user_name>

root@(none):/etc# adduser lejos   
adduser: /home/lejos: File exists
Changing password for lejos
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
Enter new password:
Bad password: too short.

Warning: weak password (continuing).
Re-enter new password:
Password changed.
root@(none):/etc#


Once the system has the new user, it is necessary to test. I have opened a new shell window to test:

Code: Select all
Last login: Sun Apr 27 14:09:11 on ttys003
soulFactory:BoR jabrena$ ssh lejos@10.0.1.1
lejos@10.0.1.1's password:
lejos@(none):~$ ls
programs
lejos@(none):~$ cd programs/
lejos@(none):~/programs$ ls
HelloWorld.jar  HelloWorld.out
lejos@(none):~/programs$ who
USER       TTY      IDLE      TIME            HOST
root       pts/0    00:00     Jan  1 00:01:24 10.0.1.10
lejos      pts/1    00:00     Jan  1 00:08:01 10.0.1.10
lejos@(none):~/programs$


Maybe for next releases, LeJOS could have 2 users, one admin user and a generic user.
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 295
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: leJOS 0.8.1 what is the password for lejos user?

Postby esmetaman » Sun Apr 27, 2014 2:56 pm

To avoid permission problems, it is necessary to update permissions for programs folder:

Code: Select all
root@(none):/home/lejos# ls -la
drwxr-sr-x    3 lejos    lejos        4096 Jan  1 00:30 .
drwxr-xr-x    4 root     root         4096 Jan  1 00:05 ..
-rw-r--r--    1 lejos    lejos         166 Jan  1 00:30 .ash_history
drwxr-xr-x    2 root     root         4096 Jan  1 00:16 programs
root@(none):/home/lejos# chmod 777 programs/


Once, the folder programs has permissions for the new user, it is possible to use scp without any problem with the new generic user:

Code: Select all
scp root@10.0.1.1:lejos/samples/HelloWorld.jar /Users/jabrena/Documents   
scp /Users/jabrena/Documents/HelloWorld.jar  lejos@10.0.1.1:/home/lejos/programs/


After copying the program, the User menu can use the new program stored in /home/lejos/programs without any problem.
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 295
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff