FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 04-24-2012, 02:20 PM
"Dmitry S. Kravtsov"
 
Default Why chsh behaviour differs from specified in manpage?

Hi,

Today I messed around with zsh and login shells and found a strange thing -
when I try to change my own login shell - chsh forbids me to do this:

$ chsh -s /bin/bash
You may not change the shell for 'kravitz'.
$ whoami
kravitz

So it states, that I can't change login shell for current user, but lets
look at manpage:

DESCRIPTION
The chsh command changes the user login shell. This determines the
name of the users initial login command. A normal
user may only change the login shell for her own account; the
superuser may change the login shell for any account.

So this it's either a bug in chsh or in its documentation. Does anyone has
the same problem?

By the way, is it a typo in manpage: "for her own account"? Who is "her"?
if we talk about user, there should be "his". But maybe I'm wrong, since
english is definitely not my native language.

--
Dmitry S. Kravtsov
 
Old 04-25-2012, 09:32 AM
Dmitry Kravtsov
 
Default Why chsh behaviour differs from specified in manpage?

On Wed, Apr 25, 2012 at 12:20:52PM +0800, XeCycle wrote:
> "Dmitry S. Kravtsov" <idkravitz@gmail.com> writes:
>
> > Hi,
> >
> > Today I messed around with zsh and login shells and found a strange thing -
> > when I try to change my own login shell - chsh forbids me to do this:
> >
> > $ chsh -s /bin/bash
> > You may not change the shell for 'kravitz'.
> > $ whoami
> > kravitz
> >
> > So it states, that I can't change login shell for current user, but lets
> > look at manpage:
> >
> > DESCRIPTION
> > The chsh command changes the user login shell. This determines the
> > name of the users initial login command. A normal
> > user may only change the login shell for her own account; the
> > superuser may change the login shell for any account.
>
> Have you messed with PAM? Sounds like you blocked yourself in
> /etc/pam.d/chsh.
>

Nope, as I already replied here - problem is now resolved. The problem
was - I accidently set by root the login shell of my user to "zsh"
instead of "/bin/zsh". And according to very unclear note in manpage
of chsh - both current and new login shells should be described in
/etc/shells. I set a correct login shell for my user by root and now
the problem is resolved - chsh works correctly
 

Thread Tools




All times are GMT. The time now is 09:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org