≡ Menu

Solaris UNIX: Change Default Shell

How do I change default ksh shell to bash shell under Solaris / OpenSolaris UNIX operating system using command line options?

You need to use passwd command to change your login shell under Solaris UNIX operating systems. Also, the passwd command changes the password or lists password attributes associated with the user’s login name. Additionally, privileged users can use passwd to install or change passwords and attributes associated with any login name.

Change Default Shell

Use the command as follows for normal user (assuming that you have rights:
$ sudo passwd -e username
$ sudo passwd -e vivek

Otherwise login as the root and enter:
# passwd -e root
# passwd -e vivek

You can also create a sudo entry for user called vivek to change his shell:
vivek ALL=NOPASSWD: /bin/passwd -e
Or all users in users group can changer their own shell:
%users ALL=/bin/passwd -e

Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 3 comments… add one }
  • MD July 7, 2011, 4:31 am

    All this does is expires the password

  • Saket Kale July 30, 2012, 8:55 am

    This does work(passwd -e) and the shell gets changed in Solaris,

  • Bruce Wayne May 14, 2013, 9:03 am

    I’m trying on solaris platform but I can’t edit the sudoers even using root account. Also Visudo doesn’t work. How to save sudoers as it is read only?

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , , , , ,