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 ?

Comments

  • lee42x
    lee42x Posts: 351

    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.

    Lee

  • coop
    coop Posts: 835

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

  • fcioanca
    fcioanca Posts: 1,148

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

  • Great, thanks.

Categories

Upcoming Training