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
🐧 3 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
All this does is expires the password
This does work(passwd -e) and the shell gets changed in Solaris,
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?