Lines Matching refs:shell
1 /* chsh.c - Change login shell.
15 Change user's login shell.
19 Non-root users can only change their own shell to one listed in /etc/shells.
32 char *user, *line, *shell, *encrypted;
56 // Get new shell (either -s or interactive)
58 if (toys.optflags) shell = TT.s;
60 xprintf("Changing the login shell for %s\n"
62 " Login shell [%s]: ", user, passwd_info->pw_shell);
63 if (!(shell = xgetline(stdin))) xexit();
66 // Verify supplied shell in /etc/shells, or get default shell
67 if (strlen(shell))
68 while ((line = xgetline(file)) && strcmp(shell, line)) free(line);