function auth_get_shells($uid = 0){ $shells = array('' => '/usr/sbin/nologin'); if ($uid == 0) { $shells = array('' => '/usr/local/sbin/opnsense-shell'); } $etc_shells = @file_get_contents('/etc/shells'); if (!empty($etc_shells)) { $etc_shells = explode("\n", $etc_shells); foreach ($etc_shells as $shell) { $shell = trim($shell); if ( !empty($shell) && strpos($shell, '#') !== 0 && strpos($shell, '/usr/local/sbin/opnsense-') !== 0 ) { $shells[$shell] = $shell; } } } return $shells;}