You are not logged in.
Such configuration tools usually need sudo ... even though I successfully used chsh w/o sudo <shrugs>
Is your user really called 'user'? What's the output of 'whoami'?
Offline
no no i just type in place my username "user" ![]()
Offline
Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
Offline
done ![]()
Offline
What do you get (in terms of permissions) if you do
$ ls -l $(which chsh) You should get "-rwsr-wr-w" as that command requires the sticky bit to be set to use it as a normal user. Even if you do get the same output as my example there, if you have the partition mounted with "nosuid", then these bits will not take effect.
Offline
Not sure if this question is for me or for OP :-)
$ ls -l $(which chsh)
-rwsr-xr-x 1 root root 18292 May 30 14:56 /usr/bin/chsh$ chsh -s /usr/bin/zsh
Changing shell for karol.
Password:
Shell changed.
$ type chsh
chsh is hashed (/usr/bin/chsh)I do need 'sudo' to e.g. install stuff with pacman.
I don't use 'nosuid' for my regular partitions although it's used for cgroup, tmpfs and the like.
Offline
Oh it was for the OP. It was just in case he actually wanted to get to the bottom of why chsh only worked as root. Those possibilities just came to mind as being problematic.
Offline
-rwsr-xr-x 1 root root 19360 05-30 14:55 /usr/bin/chshLast edited by Suami777 (2013-07-08 20:37:49)
Offline
... and mount options?
$ awk '5== "/"' /proc/self/mountinfoOffline
... and mount options?
$ awk '$5== "/"' /proc/self/mountinfo
Fixed that for you ![]()
Offline
Thanks jasonwryan.
Offline
19 1 8:3 / / rw,relatime shared:1 - ext4 /dev/sda3 rw,data=orderedbtw do you have maybe some webiste how to make themes for zsh ?
Offline
You could have easily googled that yourself, but here you go.)
Offline
19 1 8:3 / / rw,relatime shared:1 - ext4 /dev/sda3 rw,data=orderedbtw do you have maybe some webiste how to make themes for zsh ?
Alright, I'm officially out of ideas... sorry.
What do you mean by "themes"? Are you talking about the prompt?
Offline
I just had the same problem, somehow it worked when i closed X (openbox) and did it on tt1.
och noes!
Offline
You could have easily googled that yourself, but here you go.)
haha thanks
but i mean can someone recommend me some webiste ![]()
Offline
That disnt work for me, and i have no idea why.
$ chsh -s $(which zsh)
password:
shell changed.
[ ... ]
$ echo $SHELL
/bin/bashAnd "sudo chsh" changed the shell for root. For whom it worked perfectly, both with sudo or su...
I don't know how to make chsh work, but i used a trick.
At the very begining of your .bashrc file, add the following line :
~/.bashrc
----------------------------------------------------------------
/usr/bin/zsh ; exitSo the terminal will beging by launching zsh, and will exit with it.
I hope i helped. I m still interested in a "clean" way of doing it.
Last edited by Jacka (2014-07-03 10:41:50)
Offline
That disnt work for me, and i have no idea why.
$ chsh -s $(which zsh) password: shell changed. [ ... ] $ echo $SHELL /bin/bash
If this is actually all you did, then it makes sense why you would think it did not work. You would need to log out and then back in again in order for this change to complete. It might also be that your chsh binary doesn't have the proper permissions in order for this to work properly. It needs to have the sticky bit set for the user in order to write to /etc/passwd when called as a normal user.
Can you try doing sudo chsh -s /bin/zsh jacka instead? This will guarantee that chsh has proper write access to /etc/passwd. You should probably also check /etc/passwd to make sure that it is being written to your user's line.
And "sudo chsh" changed the shell for root. For whom it worked perfectly, both with sudo or su...
I don't know how to make chsh work, but i used a trick.
At the very begining of your .bashrc file, add the following line :~/.bashrc ---------------------------------------------------------------- /usr/bin/zsh && exitSo the terminal will beging by launching zsh, and will exit with it.
I hope i helped. I m still interested in a "clean" way of doing it.
I think in the case of sudo and su, this works because you are actually creating a new login upon every call of sudo or su. So from your normal user's login, when you do 'sudo chsh -s /bin/zsh' it is changing the root users shell. When you call sudo again, it is as though it is logging in a whole separate time. (either that or my second theory on the sticky bit being not set is true)
I would avoid unnecessarily calling /usr/bin/zsh in your .bashrc if possible. To me it doesn't really seem like a "clean" way of doing things.
Last edited by WonderWoofy (2014-07-02 15:23:59)
Offline
My way doesn't seem "clean" to me either, that is why i said i am still interested in new posts.
I did logout-login as it was said in previous posts, my bad for being unclear.
I agree with your sudo-theory.
"sudo chsh -s /bin/zsh jacka" had no effetcs : it said "chsh: Shell not changed.", because it thinks it is zsh yet. $SHELL is still /bin/bash though.
I edited my previous post. I came up using ";" rather than "&&" in bashrc so bash would exit even if zsh had errors.
Thank you for your answer.
Offline
If you have root access, you can just manually change the shell by editing /etc/passwd (preferably with vipw).
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Online
Weird thing : I used "sudo vipw" to edit the file. But in it, it is written my shell is already zsh, at /bin/zsh !
So i deleted the "/bin/zsh" line in bashrc to see what would appen, and my shell was indeed zsh !
Maybe chsh needs to close every shell of the user, including the Xorg session ? In that case, the best thing would be to reboot after chsh.
That's a mystery. But it worked, thank you !
Offline
@Jacka, as I mentioned before, you need to log out and then back in...
Offline
@WonderWoofy, As i mentionned before, i did log out, and then back in.
I did logout-login as it was said in previous posts, my bad for being unclear.
I think i had to close every terminal open i had, including my Xorg session.
Offline
First
```chsh -s /bin/zsh```
Then
```chsh -s /usr/bin/zsh```
Can solve my error(chsh: Shell not changed.)
Offline
Please don't necrobump 10 year old solved threads, make a new one if you actually still have an issue.
Closing.
Offline