껍질을 생선으로 바꾸는 방법에 대한 아이디어가 있습니까?
$ sudo usermod -s /usr/bin/fish jaan
usermod: user 'jaan' does not exist in /etc/passwd
$ getent passwd $USER
jaan:x:15466:94:Jaan Altosaar:/home/jaan:/bin/zsh
관련 질문 : 기본 쉘을 변경하려고 할 때 사용자가 / etc / passwd에 존재하지 않습니다 . ldap을 사용하는 것처럼 보입니다.
$ cat /etc/nsswitch.conf
passwd: compat ldap
group: compat ldap
shadow: compat ldap
# Having the NOTFOUND=return bit was breaking dns resolution on web1 and web2. But we probably
# don't want any of the mdns stuff so let's get rid of it all.
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: ldap
automount: ldap
그래서 ldap 관련 패키지를 설치했습니다.
$ chsh.ldap
LDAP password for jaan:
Enter the new value, or press ENTER for the default
Login Shell [/bin/zsh]: /usr/bin/fish
Traceback (most recent call last):
File "/usr/bin/chsh.ldap", line 69, in <module>
constants.NSLCD_USERMOD_SHELL: shell,
File "/usr/share/nslcd-utils/nslcd.py", line 128, in usermod
assert con.get_response() == constants.NSLCD_RESULT_BEGIN
File "/usr/share/nslcd-utils/nslcd.py", line 103, in get_response
return self.read_int32()
File "/usr/share/nslcd-utils/nslcd.py", line 71, in read_int32
return _int32.unpack(self.read(_int32.size))[0]
struct.error: unpack requires a string argument of length 4
$ which fish
/usr/bin/fish
$ chsh.ldap
LDAP password for jaan:
Enter the new value, or press ENTER for the default
Login Shell [/bin/zsh]: "/usr/bin/fish"
/usr/bin/chsh.ldap: "/usr/bin/fish" is an invalid shell
$ /usr/bin/fish
(standard_in) 1: syntax error
Welcome to fish, the friendly interactive shell
가능합니까?
—
George Udosen
@George 편집을 확인하십시오.
—
Abhishek Bhatia
@George이 작동하지 않습니다.
—
Abhishek Bhatia
쉘 경로에 있어야
—
muru
/etc/shells
하기위한 chsh
-like 도구를 적용합니다.