pavement

Invalid shell

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m (paren)
m
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
An '''invalid [[shell]]''' is a path to a program in the account database's ''login shell path'' field that does not exist, cannot be executed for login, or if executed does not provide a shell. [[ /sbin/nologin]] is an invalid shell, and [[ /bin/false]] is another, both of which are program paths that <code>root</code> can use to ''intentionally'' disable shell access for the user to which they are assigned as the login shell.  It is a valid reason to be distressed if you somehow manage to ''unintentionally'' assign an invalid shell to <code>root</code>, which can be done as easily as, for example, assigning <code>/usr/local/bin/bash</code> as the root user's login shell, and then deleting that port.  Oops.
+
An '''invalid [[shell]]''' is a path in the account database's ''login shell path'' field to a file that does not exist or, cannot be executed for login or, if executed does not provide a shell. [[ /sbin/nologin]] is an invalid shell, and [[ /bin/false]] is another, both of which are program paths that <code>root</code> can use to ''intentionally'' disable shell access for the user to which they are assigned as the login shell.  It is a valid reason to be distressed if you somehow manage to ''unintentionally'' assign an invalid shell to <code>root</code>, which can be done as easily as, for example, assigning <code>/usr/local/bin/bash</code> as the root user's login shell, and then deleting that port.  Oops.  What if <code>bash</code> is not located on your boot partition, and <code>/usr/local/bin</code> fails to mount?  Oops again.
  
 
This isn't quite the same thing as a ''non-standard shell'' - which can include any valid shell, the path of which is not listed in the ''shell database'' (/[[etc/shells]]). A non-root user cannot assign itself a shell that does not exist in the shell database; or, the message will return:
 
This isn't quite the same thing as a ''non-standard shell'' - which can include any valid shell, the path of which is not listed in the ''shell database'' (/[[etc/shells]]). A non-root user cannot assign itself a shell that does not exist in the shell database; or, the message will return:

Latest revision as of 11:19, 16 June 2006

An invalid shell is a path in the account database's login shell path field to a file that does not exist or, cannot be executed for login or, if executed does not provide a shell. /sbin/nologin is an invalid shell, and /bin/false is another, both of which are program paths that root can use to intentionally disable shell access for the user to which they are assigned as the login shell. It is a valid reason to be distressed if you somehow manage to unintentionally assign an invalid shell to root, which can be done as easily as, for example, assigning /usr/local/bin/bash as the root user's login shell, and then deleting that port. Oops. What if bash is not located on your boot partition, and /usr/local/bin fails to mount? Oops again.

This isn't quite the same thing as a non-standard shell - which can include any valid shell, the path of which is not listed in the shell database (/etc/shells). A non-root user cannot assign itself a shell that does not exist in the shell database; or, the message will return:

%chsh -s /sbin/nologin
chsh: /sbin/nologin: non-standard shell

Obviously, you don't want an invalid shell to be listed in the database of standard shells (/etc/shells).

Personal tools