FTP user default shell defunct


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers FTP user default shell defunct
# 1  
Old 08-27-2010
FTP user default shell defunct

Hello,

I have a problem with my FTP users.

I have create the ftp user on my AIX server, I set the default shell /bin/false or /usr/bin/false.
Its enough that the user can logon via FTP.

But when I try the user for example via ssh, the shell session is not killed, the session is defunct Smilie.
I want to check that the user cannot logon via ssh Smilie
ww25b1 2043906 5988416 0 11:35:39 - 0:00 sshd: ww25b1@pts/1
ww25b1 4964600 2043906 1 0:00 <defunct>

I try to check what is the problem, but logs there aren't logged this faliure.
# 2  
Old 08-27-2010
If you don't give the user a shell, the ftp login for that user will not work. At least not on a AIX 5.3 or Debian Lenny box.

If you want to enable login via ftp and deny it for ssh/scp/sftp, let him have his shell, but add in /etc/ssh/sshd_config something like:
Code:
..
DenyUsers youruser

Restart sshd to enable this:
Code:
stopsrc -s sshd
startsrc -s sshd

# 3  
Old 08-27-2010
re

My problem is, if I set "false" shell to my user, that is working with FTP, but If a user has false shell, when the user try to logon for example via SSH, the SSH connection should be kill/close, but the SSH session is will be "defunct".

FTP connection works as well, but what about the SSH? Smilie

And this defunct processes cannot kill with kill-9 command, just if I kill the defunct parent sshd process.

Quote:
Originally Posted by zaxxon
If you don't give the user a shell, the ftp login for that user will not work. At least not on a AIX 5.3 or Debian Lenny box.

If you want to enable login via ftp and deny it for ssh/scp/sftp, let him have his shell, but add in /etc/ssh/sshd_config something like:
Code:
..
DenyUsers youruser

Restart sshd to enable this:
Code:
stopsrc -s sshd
startsrc -s sshd

# 4  
Old 08-31-2010
Yes, I think I understood but I can't reproduce your problem. When I don't give a shell to a user, there will be no login possible via ftp on any try.

Why not try the way I described? So users will be able to ftp, still have a shell assigned and can't really do anything with the shell because they are kept outside due to the sshd configuration. So no ssh, sftp or scp for them. You should make sure you turn rsh and telnet off too of course.
Is this solution not to your liking?
# 5  
Old 08-31-2010
Yes, that is a good solution, but I cannot change this process.
I just try to understand/investigate the problem, because my another servers this solution is works, but I didn't find differencies between the servers.
And I didn't found anything in the log files.
Just only this server do this Smilie

Quote:
Originally Posted by zaxxon
Yes, I think I understood but I can't reproduce your problem. When I don't give a shell to a user, there will be no login possible via ftp on any try.

Why not try the way I described? So users will be able to ftp, still have a shell assigned and can't really do anything with the shell because they are kept outside due to the sshd configuration. So no ssh, sftp or scp for them. You should make sure you turn rsh and telnet off too of course.
Is this solution not to your liking?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Change default shell of a specific user with awk

I would like to replicate the functionality of chsh (or passwd -e) by awk. This is what I got so far, but I think there should be an easier way to search and replace field $7 only for lines beginning with user_name: awk -v user_name="$user_name" -v new_shell="$new_shell" -F: '$1 == user_name {... (2 Replies)
Discussion started by: nomad84
2 Replies

2. UNIX for Dummies Questions & Answers

default shell for the user

for example, if we specify,#!/usr/bin/ksh then the script will be executed in korn shell. If we don't specify that line, the script will be executed using the default shell. So, how we can identify the default shell for the current user? Will it be in .profile file ? Thanks (13 Replies)
Discussion started by: pandeesh
13 Replies

3. UNIX for Advanced & Expert Users

defunct processes?

HiI had a tool fail recently, on analysis I found it was cleaning up orphaned directories that had been created by specific processes that had died for some reason, thus failing to clean up after themselves.The directories were of the form /dir.pid. The tool would look to see if any instances of... (2 Replies)
Discussion started by: steadyonabix
2 Replies

4. UNIX for Dummies Questions & Answers

How to change Default Shell for any user?

Hi, I am new for solaris... how can we change default shell for any user and how to check that which shall currently we are in...... (1 Reply)
Discussion started by: lalit21984
1 Replies

5. Solaris

Defunct process

My system is running solaris zones and oracle dbs in all the zones .. and now i find more then 4500 defunct processes in ps output. Can anyone know about this how to kill these # ps -ef | grep defunct | wc -l 4899 And when i do ptree on one of the pid it shows most of the defunct... (3 Replies)
Discussion started by: fugitive
3 Replies

6. Programming

defunct vs running

hello everybody! Is there any way to identify if a process is defunct or if it is still running? (in C). for example: by using a signal such as SIGCHLD? thanx in advance (1 Reply)
Discussion started by: nicos
1 Replies

7. AIX

Defunct Processes

Hi, Can any one help me to get rid of defunct process on UNIX IBM AIX box. These processes started when the system was rebooted almost after 1 1/2 years. Once one defunct process is created then all the user ids get infected and in turn creates numerous defunct processes. We have tried... (6 Replies)
Discussion started by: trokia88
6 Replies

8. Virtualization and Cloud Computing

Cloud User Shell 1.0 (Default branch)

http://c.fsdn.com/fm/screenshots/70112_thumb.png Cloud User Shell (cush) is a multi-call executable bringing RESTful cloud control to the command line, combining many useful cloud computing utilities into a single executable. It follows the Unix philosophy of writing components that work together,... (0 Replies)
Discussion started by: Linux Bot
0 Replies

9. Programming

defunct process!!

how can i assure that daemon process which is being run as init child,can be removed immediately from system when it goes defunct or to avoid daemon process becoming defunt? (5 Replies)
Discussion started by: rish2005
5 Replies

10. UNIX for Dummies Questions & Answers

<DEFUNCT> Processes

When I ps -ef I see about 3 or 4 <DEFUNCT> things - what are these, and what causes them? Are they a concern? How can I fix them? Thanks, Michael (4 Replies)
Discussion started by: cuppjr
4 Replies
Login or Register to Ask a Question