Or you may need to submit a support ticket requesting a shell change. There may be a local command that does what chsh normally does. The procedure for changing your shell depends on your organization's policies. ![]() Or perhaps your system's administrator just wants to maintain some control. Most likely you can't use chsh as non-root because the system you're using is configured so that chsh wouldn't work, for example because the system uses NIS or LDAP rather than just the /etc/passwd file. If you can't run chsh because you don't have admin privileges, talk to someone who does. If your login shell is csh or tcsh, see an example in Changing the default shell without chsh or administrator priviledges bash_profile, so even there you should be careful not to call exec in a non-interactive shell. Most session startup scripts only read ~/.profile and not ~/.bash_profile, but I've seen some that run under bash and read. Alternatively, you may put these commands in ~/.bash_profile. If your login shell is bash, you can proceed as above. *i*) SHELL=$preferred_shell export SHELL exec "$preferred_shell" Except for the Bourne shell (the /bin/sh of Solaris 10 and before), you can tell that a shell is interactive by the presence of i in the option list ( $-). for X11 sessions), so you need to take care: only call exec (which replaces the current process) when the current shell is interactive. Beware that this file is read at the beginning of an interactive session as well as by some non-interactive session startup scripts (e.g. If your login shell is sh, dash or ksh: the file you need to edit is ~/.profile. If you can't use chsh or its variants at your site, then arrange for your login shell to exec your favorite shell, and set the SHELL variable to point to your favourite shell. ![]() There might be a ypchsh (NIS) or chsh.ldap (LDAP) instead.Ĭhsh will also usually allow only some approved shells, typically the ones listed in /etc/shells. But it's occasionally disabled, usually in sites that use some form of networked user database like NIS and LDAP. Normally you can use chsh as a non-root user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |