Welcome to the Linux Foundation Forum!

Possible typo - Ch.30 - Restricted Accounts

I wonder if there is a typo in the guidance on how to specify a restricted shell in /etc/passwd.

The instructions show three ways of aliasing bash to rbash; with a hard link, with a symlink and making a copy of bash called rbash.

From this, I assume that using the name rbash invokes bash with the -r option. If that is the case, should the line in /etc/passwd include /bin/rbash rather than /bin/bash ?


  • lee42x
    lee42x Posts: 380

    Yes, the program "bash" looks at its name when it starts and if it is "rbash" it runs as if "-r" option was added. The line in /etc/passwd should be /bin/rbash to invoke the restricted shell.


  • coop
    coop Posts: 913

    Thanks. This is indeed a typo. The underlying source does have rbash in /etc/passwd

  • fcioanca
    fcioanca Posts: 1,770

    This has been fixed. Thank you for pointing it out.

  • Great, thanks.

  • imeister
    imeister Posts: 1

    Same page needs editing. Mid-page paragraph mentions not referencing system dirs in PATH, then almost the same sentence is repeated in the second to last paragraph. Also, it would be nice to add mention of bash checking its name when it runs as explained above -- I thought there was a typo in the link command example.


Upcoming Training