![]() |
|
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
New telnetd installation produces error: login: Permission Denied
I am trying to configure the telnetd service daemon on Gentoo.
I first installed the internet superserver daemon: emerge netkit-base I next installed the telnetd server daemon: emerge netkit-telnetd I next created a user and group for the telnetd server daemon: groupadd -g 300 telnetd useradd -u 300 -g 300 telnetd I now modified the telnetd account in /etc/passwd as follows: telnetd:x:300:300::/nonexistent:/bin/false (This line is copied from a working telnet server) Then I created the /etc/inetd.conf configuration file for the internet superservice daemon with the following entry: telnet stream tcp nowait telnetd /usr/sbin/telnetd Next I start the internet superserver daemon as follows: /etc/init.d/inetd start * Starting inetd ... Now I telnet the localhost: telnet localhost Trying 127.0.0.1 ... Connected to localhost.localdomain. Escape character is ']' Linux 2.6.23.9 (despina.markhobley.yi.org) (1) login: Permission Denied. Connection closed by foreign host. The error at the login prompt appears before I type in the username, so I think the error is related somehow to the login program. I presume that the login: prompt is being generated by the login program, and then the program is exiting before user input can be collected, so I suspect the login program was running, but I don't know for sure. I guess that somehow I have to make a configuration change to allow the login program to be used from the telnet virtual terminal. (Then again, I might be wrong.) Thanks in advance to anyone who can help with this. Mark. -- Mark Hobley, 393 Quinton Road West, Quinton, BIRMINGHAM. B32 1QE. |
|
|||
|
Re: New telnetd installation produces error: login: Permission Denied
Mark Hobley wrote:
> I am trying to configure the telnetd service daemon on Gentoo. > > I first installed the internet superserver daemon: > > emerge netkit-base > > I next installed the telnetd server daemon: > > emerge netkit-telnetd > > I next created a user and group for the telnetd server daemon: > > groupadd -g 300 telnetd > useradd -u 300 -g 300 telnetd > > I now modified the telnetd account in /etc/passwd as follows: > > telnetd:x:300:300::/nonexistent:/bin/false > > (This line is copied from a working telnet server) > > Then I created the /etc/inetd.conf configuration file for the internet > superservice daemon with the following entry: > > telnet stream tcp nowait telnetd /usr/sbin/telnetd Mine says telnet stream tcp nowait telnetd.telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd > > Next I start the internet superserver daemon as follows: > > /etc/init.d/inetd start > * Starting inetd ... > > Now I telnet the localhost: > > telnet localhost > Trying 127.0.0.1 ... > Connected to localhost.localdomain. > Escape character is ']' > Thats the telnetd working then..at some level > Linux 2.6.23.9 (despina.markhobley.yi.org) (1) > login: Permission Denied. > Connection closed by foreign host. > Thats login crapping out. Permissions of some sort. .. > > The error at the login prompt appears before I type in the username, so > I think the error is related somehow to the login program. > So do I. > I presume that the login: prompt is being generated by the login > program, and then the program is exiting before user input can be > collected, so I suspect the login program was running, but I don't know > for sure. I guess that somehow I have to make a configuration > change to allow the login program to be used from the telnet virtual > terminal. (Then again, I might be wrong.) > Never had a problem. If you can get a root prompt do an: su - telnetd And then try : /bin/login Thats is close to the permissions it will be running at Likewise, look in the log files. > Thanks in advance to anyone who can help with this. > > Mark. > |
|
|||
|
Re: New telnetd installation produces error: login: Permission Denied
Mark Hobley wrote:
> Then I created the /etc/inetd.conf configuration file for the internet > superservice daemon with the following entry: > > telnet stream tcp nowait telnetd /usr/sbin/telnetd > > Next I start the internet superserver daemon as follows: Why not use the xinted instead? or why not use ssh? > Now I telnet the localhost: > > telnet localhost > Trying 127.0.0.1 ... > Connected to localhost.localdomain. > Escape character is ']' > Linux 2.6.23.9 (despina.markhobley.yi.org) (1) > login: Permission Denied. > Connection closed by foreign host. > The error at the login prompt appears before I type in the username, so > I think the error is related somehow to the login program. What do you get in the messages log file? -- //Aho |
|
|||
|
Re: New telnetd installation produces error: login: Permission Denied
In alt.os.linux.gentoo J.O. Aho <user@example.net> wrote:
> Why not use the xinted instead? I prefer inetd, it is less resource intesive, and I am using it on all of my other stations. I try and use the same software across all stations, where possible. > or why not use ssh? The ssh tool encrypts the network traffic making it difficult to analyse. I don't want encrypted traffic on the local area network. > What do you get in the messages log file? This is a new installation, and the system logging mechanisms are not yet operational. I was hoping to fix this after fixing the remote access via telnet. I am new to Gentoo, so I am still learning how to configure it. I am currently working on getting the system loggine mechanisms operational. Mark. -- Mark Hobley, 393 Quinton Road West, Quinton, BIRMINGHAM. B32 1QE. |
|
|||
|
Re: New telnetd installation produces error: login: Permission Denied
["Followup-To:" header set to comp.os.linux.misc.]
Mark Hobley staggered into the Black Sun and said: > In alt.os.linux.gentoo J.O. Aho <user@example.net> wrote: >> Why not use the xinted instead? > I prefer inetd, it is less resource intesive, and I am using it on all > of my other stations. I try and use the same software across all > stations, where possible. >> or why not use ssh? > The ssh tool encrypts the network traffic making it difficult to > analyse. I don't want encrypted traffic on the local area network. Um... why would you need to analyze this traffic? Also, ssh, when set up properly, is more *convenient* than telnet. Don't forget ssh's X11 forwarding capabilities, necessary since most modern X installs are started with '-nolisten tcp'. >> What do you get in the messages log file? > This is a new installation, and the system logging mechanisms are not > yet operational. I was hoping to fix this after fixing the remote > access via telnet. I am new to Gentoo, so I am still learning how to > configure it. I am currently working on getting the system loggine > mechanisms operational. Like section 9.a of the Gentoo Handbook says, emerge syslog-ng rc-update add syslog-ng default /etc/init.d/syslog-ng start ....you should've done that or something similar during initial install. The default syslog-ng config, located in /etc/conf.d/ , should get you something sensible. Most of the config files for the init scripts are in /etc/conf.d/ . -- Sometimes I lie awake at night, and I ask, "Where have I gone wrong?" Then a voice says to me, "This is going to take more than one night." Charles M. Schulz (1922 - 2000), Charlie Brown in "Peanuts" Matt G|There is no Darkness in Eternity/But only Light too dim for us to see |
|
|||
|
Re: New telnetd installation produces error: login: Permission Denied
markhobley@hotpop.donottypethisbit.com (Mark Hobley) writes:
> I am trying to configure the telnetd service daemon on Gentoo. > > I first installed the internet superserver daemon: > > emerge netkit-base There's another telnetd in Gnu's inetutils. That's the one I have here, if you can't make a go with this one. Plus, I'm not sure the net-kit one is even being maintained anymore, which might be a security concern. For that matter, I think inetutils includes an inetd as well. > I now modified the telnetd account in /etc/passwd as follows: > > telnetd:x:300:300::/nonexistent:/bin/false Some apps crap out with a bogus home directory. That may or may not be the case here, but I thought I'd mention it. > telnet localhost > Trying 127.0.0.1 ... > Connected to localhost.localdomain. > Escape character is ']' inetd's done its part ... looks like telnetd's passed control to login when it hits trouble. > Linux 2.6.23.9 (despina.markhobley.yi.org) (1) > login: Permission Denied. > Connection closed by foreign host. Are you sure your telnetd can run as an unpriv. user? > The error at the login prompt appears before I type in the username, so > I think the error is related somehow to the login program. > > I presume that the login: prompt is being generated by the login > program, and then the program is exiting before user input can be > collected, so I suspect the login program was running, but I don't know > for sure. I guess that somehow I have to make a configuration > change to allow the login program to be used from the telnet virtual > terminal. (Then again, I might be wrong.) I'd test with setting a real path for the home dir., and running as root. See if it clears up, and decide from there what to do. Also, if the daemon needs some command line options, make sure those are OK too, check out the man page. Maybe try to run it stand-alone without inetd, and get it working like that before putting it under inetd. -- [** America, the police state **] Whoooose! What's that noise? Why, it's US citizen's rights, going down the toilet with Bush flushing. http://www.wired.com/politics/securi...007/08/wiretap http://www.hermes-press.com/police_state.htm http://www.privacyinternational.org/...D=x-347-559597 |
|
|||
|
Re: New telnetd installation produces error: login: Permission Denied
In alt.os.linux.gentoo Mark Hobley <markhobley@hotpop.donottypethisbit.com> wrote:
> However, I still get the permission denied error, if I run the telnetd > as user telnetd in inetd.conf It looks like there might be some sort of bug in the telnetlogin program. Why do we use this wrapper, instead of just suid the login program? (Incidentally, I tried this, but it does not work. I still can't login if telnetd is non-root.) I wonder if there is some sort of debugging wrapper that would tell me where the code fails. I am very inexperienced in debugging C in Linux, because my background is with Assembly Language and Microsoft Codeview. Failing that I probably need to insert some sort of "echo" traces into the code. Mark. -- Mark Hobley, 393 Quinton Road West, Quinton, BIRMINGHAM. B32 1QE. |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|