Telnet

Hi,

You can copu all files related to user account in editable flash drive by creating a folder there as /etc and can create a symbolic link using below syntax
ln -sP pathToDirecroty /etc
Where: pathToDirectory is path to etc directory created in editable flash drive

another option is u can have .efs file system and can mount /etc drive with user account related files in editable flash drive.

Hope this help.

Hi nico04

I have one more problem related to Telnet login.

I want to login Telnet using any other user apart from root. So i created a new user and deleted root from passwd file. But after this i am not able to telnet my device. If i recreate root user it works.
How i can remove root user ?

Ashi

Have you modified /etc/inetd.conf file ?

Yes i tried modifying inetd.conf file by changing user name for Telnet but it didnt worked.

Can you post your modified inetd.conf file here.

Tim

Here is my inetd.conf file…i am not sure if i have done correct changes…my user name is testUser

Internet services syntax:

<service_name> <socket_type> <server_pathname>

Time service is used for clock syncronization.

#time stream tcp nowait root internal
#time dgram udp wait root internal

Ftp and telnet are standard Internet services.

ftp stream tcp nowait root /proc/boot/ftpd in.ftpd -l
telnet stream tcp nowait testUser /proc/boot/telnetd in.telnetd

Shell, login, exec are BSD protocols.

shell stream tcp nowait root /proc/boot/rshd in.rshd
login stream tcp nowait root /proc/boot/rlogind in.rlogind
exec stream tcp nowait root /proc/boot/rexecd in.rexecd

Tftp service is provided primarily for booting. Most sites run this

only on machines acting as “boot servers”.

#tftp dgram udp wait root /proc/boot/tftpd in.tftpd

Systat and netstat give out user information which man be

valuable to potential “system crackers.” Many sites choose to disable

some or all of these services to improve security.

#systat stream tcp nowait root /bin/ps ps -auwwx
#netstat stream tcp nowait root /proc/boot/netstat netstat -f inet

IPv6 services.

The only difference with the above is “tcp6” instead of “tcp”.

Be sure to enable both “tcp” and “tcp6” when you need service for

both IPv4/v6.

#ftp stream tcp6 nowait root /proc/boot/ftpd ftpd -ll
telnet stream tcp6 nowait testUser /proc/boot/telnetd telnetd
#shell stream tcp6 nowait root /proc/boot/rshd rshd -L
#login stream tcp6 nowait root /proc/boot/rlogind rlogind -L
#tftp dgram udp6 wait root /proc/boot/tftpd tftpd -l -s /tftpboot

What you have looks reasonable at a quick glance.

Now for the important question. Can your ‘testUser’ actually log in? There is more to logging in than just having a username/password.

qnx.com/developers/docs/6.3. … login.html

Ie you may need a home directory for your user and potentially a group (unless you want to put testUser in the super user group with root). If testUser can’t validly log in then telnet isn’t going to work.

Tim

I have a home directory for my testUser and also if there is a root entry in ‘passwd’ file i am able to login via telnet for my testUser but if i remove root from ‘passwd’ file it doesnt work.

So you are saying the following is true:

Password file: Contains root & testUser

  • Both root & testUser can log in with telnet

Password file: Contains testUser

  • Neither root or testUser can log in with telnet.

That seems strange that root would be required to run telnet.

Here’s a knowledge base article I found on telnet under qnx for embedded targets

qnx.com/support/knowledgebas … 000000SzKu

Presumably you should be able to replace ‘root’ with testUser and it should work fine.

Tim

I am able to disable root login successfully by replacing /bin/sh as /bin/nologin in ‘passwd’ file.
Removing root user was not allowing to login Telnet service. I tried multiple options but didn;t worked so i found this workaround to disable root login.

Ashi