1847899 Members
3477 Online
104021 Solutions
New Discussion

File /etc/shells

 
Samuel Alfonzo
Occasional Contributor

File /etc/shells

Regards,
I want to known about the feature of the file shells in /etc. What kind of problems it has with FTP ?. Because, if it exists in /etc, the proccess of FTP is denied.

Thank you.
Finding the truth
7 REPLIES 7
Mark Greene_1
Honored Contributor

Re: File /etc/shells

from the ftpd man page:

"ftpd authenticates users according to three rules:

+ The user name must be in the password data base, /etc/passwd,
and not have a null password. The client must provide the
correct password for the user before any file operations can
be performed.

+ The user name must not appear in the file /etc/ftpd/ftpusers
(see ftpusers(4)).

+ The user must have a standard shell returned by
getusershell().
"

check the shell specified in the passwd file for the login ID being used, and make sure that it's one listed in /etc/shells.

HTH
mark
the future will be a lot like now, only later
Christopher McCray_1
Honored Contributor

Re: File /etc/shells

the /etc/shells file defines the list of useable shells to the system. For example, if you define a user's default shell to say, /bin/false, and that entry is not in /etc/shells, access is denied.

Hope this helps

Chris
It wasn't me!!!!
PIYUSH D. PATEL
Honored Contributor

Re: File /etc/shells

Hi,

Go thro this forum question:


http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x24905220af9bd5118ff10090279cd0f9,00.html


As far as getting bad shell for ftp, make sure the shell of the user you are logging in as is defined in /etc/shells.
Eg: if /bin/ksh is the shell the user is loggin in as make sure /etc/shells contains /bin/ksh.

Piyush
Sanjay_6
Honored Contributor

Re: File /etc/shells

Hi,

Do "man shells" for info on /etc/shells. ftp access is not denied if this file exists. However if you have an ftp user whose shell is configured as /usr/sbin/false this shell should exist in /etc/shells.

Hope this helps.

Regds
Jordan Bean
Honored Contributor

Re: File /etc/shells

hpux standard ftpd requires a valid user's default shell to match those returned by getusershell(). It returns the list from /etc/shells if it exists; Otherwise, it returns the system default

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

If ftp fails when /etc/shells is present, then the user's shell is not defined in the file.

MANOJ SRIVASTAVA
Honored Contributor

Re: File /etc/shells

Hi Samuel


/etc/shells is an ASCII file containing a list of legal shells on the system. Each shell is listed in the file by its absolute path name.
Lines or portions of lines beginning with # are assumed to be comments and are ignored. Blank lines are also ignored.


You can look at this too :


http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90682/B2355-90682_top.html&con=/hpux/onlinedocs/B2355-90682/00/03/344-con.html&toc=/hpux/onlinedocs/B2355-90682/00/03/344-toc.html&searchterms=/etc/shells&queryid=20020611-122954

Manoj Srivastava
Frank Slootweg
Honored Contributor

Re: File /etc/shells

I think your problem is with the defaults versus the non-defaults:

If /etc/shells does not exist, the defaults are (see the getusershell(3C) manual page):
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh

If /etc/shells exists, it must list *all* the shells, i.e. *also* the defaults.

I.e. specific examples:

/etc/shells does not exist: /usr/bin/sh is a valid shell.

/etc/shells contains "/usr/bin/bash": /usr/bin/bash is a valid shell, but (for example) /usr/bin/sh is *not* a valid shell (even if it is default if /etc/shells does *not* exist).

I hope this solves your problem.