Why /usr/bin/passwd is in /etc/shells?

Hello everyone,

Could you please let me know why /usr/bin/passwd is listed in /etc/shells? Can I remove it from /etc/shells?

Thanks,
Brs,
Naruto

First, I’m sure there’s a business case for removing it. Care to share?
It may also be helpful to share your SLES version, including SP, and maybe
the version of the package owning /etc/shells:

cat /etc/SuSE-release
cat /etc/os-release
rpm -qif /etc/shells

If you look at the RPM for that file it is a config file, meaning you are
meant to be able to change it, so yes you may, but you should probably
have a good reason. Have it listed as an option does not mean anything
will have that set as their default shell or anything:

rpm -qf /etc/shells #aaa_base
rpm -Vv aaa_base | grep /etc/shells


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Hi Naruto,

I believe using /usr/bin/passwd as a login shell is intentional, to allow for accounts who’s users should be able to change their password, but not be able to run any other command locally. (Those users typically have other means to access the server, i.e. ftp, without those providing any way to change their password.)

OTOH, I’ve not seen that being used for ages… if you have a security need to remove that entry, you’d do no harm removing it, after double-checking that none of your current users is set to use this “shell” as a login shell :wink:

Regards,
J