LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-14-2011, 05:20 AM   #1
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: Disabled
Telnet as root. How to setup password?


Hi guys,
Currently when I log in via telnet as root it doesn't require a password. How can I setup my Linux to ask for a password?
Thanks,
Hadar
 
Old 08-14-2011, 05:34 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Welcome to LQ

Use ssh instead, and don't connect as root, connect as user, and then su to root.
I would strongly recommend to disable telnet.

Kind regards
 
Old 08-14-2011, 05:36 AM   #3
0men
Member
 
Registered: Mar 2011
Location: Brisbane
Distribution: Windows 10, Red Hat, Debian
Posts: 183

Rep: Reputation: 22
Hi mate,

Telnet is unencrypted....... Not many people use it anymore :P This means that anyone sniffing traffic can see your full username and password. I used to see it and its almost trivial............. it takes one command "dsniff" to access all your data. I would recommend (as im sure many others will) to switching to secure shell or SSH.

Just for other members....

What type of info are you wanting to access that requires you to log in as root ?

What distro are you telneting from and what system are you telneting too ?
 
Old 08-14-2011, 05:43 AM   #4
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thank you. However, this is a requirement I have to do in my school. I need to be able to Telnet as root using a password. Currently it doesn't ask for one..
Can you please help me?

I check "/etc/passwd" and saw:
root:x:0:0:root:/root:/bin/sh

I guess, this is my problem (am I right?).
However, when I type passwd I get the following error message:
passwd: /etc/passwd: Read-only file system

How can I change the premissions of /etc/passwd in order to update it?

Thanks,
Hadar
 
Old 08-14-2011, 05:49 AM   #5
0men
Member
 
Registered: Mar 2011
Location: Brisbane
Distribution: Windows 10, Red Hat, Debian
Posts: 183

Rep: Reputation: 22
Really ??? my university would never ask me to do this.... :S

You do realize that anyone could access anything they wanted on your system.

Ill stay out of this so i dont feel guilty if you get cracked.........

Have you tried .... google ?
 
Old 08-14-2011, 05:55 AM   #6
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
This is just an exercise I got. I don't have plans do use it byond the scope of this exercise.
I tryed Google for hours. I guess i'm too newbie that even Google can't help me.
Hadar
 
Old 08-14-2011, 06:03 AM   #7
0men
Member
 
Registered: Mar 2011
Location: Brisbane
Distribution: Windows 10, Red Hat, Debian
Posts: 183

Rep: Reputation: 22
How about the first search term in google ?

http://www.idevelopment.info/data/Un...TPAsRoot.shtml
 
Old 08-14-2011, 06:15 AM   #8
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
I read it already. But it didn't answer my question. I have a problem only with setting the password and not with setting the telnet itself.
After more googling I understood that the password issue is not related to telnet but to passwd. This was the answer I looked for from this forum .
Now I have to understnad how to get passwd to work when \etc\passwd is a read-only file system.
Anyway, thank you for your time.
Hadar
 
Old 08-14-2011, 06:30 AM   #9
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
You must be a root to set password for root. So login as root or use "su" or "sudo" commands. Or if you really have read only filesystem, then remount it as read/write.

Last edited by eSelix; 08-14-2011 at 06:34 AM.
 
Old 08-14-2011, 07:04 AM   #10
0men
Member
 
Registered: Mar 2011
Location: Brisbane
Distribution: Windows 10, Red Hat, Debian
Posts: 183

Rep: Reputation: 22
Nice Work !!

I like too see when people figure it out after smashing google for hours (like me when i started using slackware :P )

Good luck in the future !
(and stay away from telnet after your assignment :P )
 
Old 08-14-2011, 07:44 AM   #11
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks
It seems I manage to pinpoint my last chalange. This is the issue:
the \etc is readonly because the OS run on an embedded machine and the \etc is mapped to a ROM section.
It means that I need to update the password on the compilation machine and not at run time.
The internet explain how to use the passwd app to update the \etc\passwd file on the machine I'm currently running. But how can I update the password field on a different machine (the compilation one)?
I can open the /etc/passwd file on the compilation machine with a vi editor, but I don't know how to write the password myself..
Can you please tell me what should I do?
 
Old 08-14-2011, 07:55 AM   #12
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Which OS it is?

Last edited by eSelix; 08-14-2011 at 07:56 AM.
 
Old 08-15-2011, 02:27 AM   #13
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
The OS is Linux 2.6.36.4.

I got it -
I found the answer here - http://www.digi.com/support/kbase/kb...tl.jsp?id=3174
1. Execte: openssl passwd -crypt NEW_PASSWORD
2. Copy the output to the second column of root in the /etc/passwd file
3. Recompile the embedded OS

Thanks for your help guys!

Last edited by unSpawn; 08-17-2011 at 12:51 AM.
 
1 members found this post helpful.
Old 08-15-2011, 02:27 AM   #14
thehadar
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Original Poster
Rep: Reputation: Disabled
The OS is Linux 2.6.36.4.

I got it -
I found the answer here - http://www.digi.com/support/kbase/kb...tl.jsp?id=3174
1. Execte: openssl passwd -crypt NEW_PASSWORD
2. Copy the output to the second column of root in the /etc/passwd file
3. Recompile the embedded OS

Thanks for your help guys!

Last edited by unSpawn; 08-17-2011 at 12:51 AM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't create root's password during setup guyinbkk Slackware 6 01-05-2011 11:26 PM
can't setup MySQL root password DarkSlayer Linux - Software 1 08-01-2010 01:04 PM
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
telnet login using root password prasunhowlader Linux - Newbie 3 09-01-2008 03:50 AM
telnet via xinetd refuse root password adme Linux - Networking 2 02-05-2003 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration