login出错,大家有没有遇过

其他Linux/Unix/BSD/OSX等发行版讨论
回复
头像
ly50247
帖子: 89
注册时间: 2008-07-29 8:01

login出错,大家有没有遇过

#1

帖子 ly50247 » 2012-07-29 13:32

64位testing,包都是最新的。
$ sudo login
Password:
zsh: suspended (tty output) sudo login

[osily@ly50247 ~]$ sudo login
Password:
[1]+ Stopped sudo login

如果是root,直接xterm退出。
之前有次发现/etc/pam.d/login文件和最新的不一样,就替换了,后来发现login出错,但替换回来还是出错。
b58f8c5494eef01fedeb9351e0fe9925bd317da3.jpg.png
b58f8c5494eef01fedeb9351e0fe9925bd317da3.jpg.png (7.25 KiB) 查看 2296 次
6159252dd42a2834a114bd9f5bb5c9ea14cebff0.jpg.png
头像
枫叶饭团
帖子: 14683
注册时间: 2010-06-16 1:05
系统: Mac OS X
来自: Tencent
联系:

Re: login出错,大家有没有遇过

#2

帖子 枫叶饭团 » 2012-07-29 14:37

我也是一样的,但是我从来不用这个命令。。。
头像
ly50247
帖子: 89
注册时间: 2008-07-29 8:01

Re: login出错,大家有没有遇过

#3

帖子 ly50247 » 2012-07-29 14:39

枫叶饭团 写了:我也是一样的,但是我从来不用这个命令。。。
我也基本不用,但看到出错不舒服
robinking623
帖子: 34
注册时间: 2006-12-07 4:36

Re: login出错,大家有没有遇过

#4

帖子 robinking623 » 2012-07-29 14:42

arch testing 出错很正常吧。如果不舒服就自己debug吧。
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: login出错,大家有没有遇过

#5

帖子 cuihao » 2012-07-29 17:20

login不是tty登录时用的玩意儿么。也许使用场合不对?
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: login出错,大家有没有遇过

#6

帖子 cuihao » 2012-07-29 17:22

不对…… 这不是出错退出。
suspended 是终止了,ctrl+Z就恢复了。虽然立即又 suspended 了。

LZ确定login可以这么用?
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: login出错,大家有没有遇过

#7

帖子 cuihao » 2012-07-29 17:26

If one uses the command "login", then the surrounding shell gets killed by vhangup() because it's no longer the true owner of the tty.
摘自man,是不是说login会干掉执行它的shell?
然后zsh为了避免被干掉,就先suspend掉login咯。
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
ly50247
帖子: 89
注册时间: 2008-07-29 8:01

Re: login出错,大家有没有遇过

#8

帖子 ly50247 » 2012-07-29 17:29

cuihao 写了:不对…… 这不是出错退出。
suspended 是终止了,ctrl+Z就恢复了。虽然立即又 suspended 了。

LZ确定login可以这么用?
以前是可以这样用的,会提示login:。
如果用root就是直接退出了。
头像
cuihao
帖子: 4793
注册时间: 2008-07-24 11:33
来自: 郑州
联系:

Re: login出错,大家有没有遇过

#9

帖子 cuihao » 2012-07-29 17:32

A recursive login, as used to be possible in the good old days, no longer works; for most purposes su(1) is a satisfactory substitute.
继续引用man。
以前可以用login进行递归登录(从一个用户登录到另一个用户),现在不行了,请用 su 代替。
求人不如求它仨: 天蓝的Wiki 屎黄的Wiki 绿
Site: CUIHAO.TK    Twitter: @cuihaoleo
Machine: Athlon64 X2 5200+ / 2x2GB DDR2-800 / GeForce GTS 450
AD: ~まだ見ぬ誰かの笑顔のために~
头像
ly50247
帖子: 89
注册时间: 2008-07-29 8:01

Re: login出错,大家有没有遇过

#10

帖子 ly50247 » 2012-07-29 17:37

cuihao 写了:
A recursive login, as used to be possible in the good old days, no longer works; for most purposes su(1) is a satisfactory substitute.
继续引用man。
以前可以用login进行递归登录(从一个用户登录到另一个用户),现在不行了,请用 su 代替。
嗯,刚才看了一眼man,果然是行为变了,谢谢。
但这个表现太像是bug了,原来是个feature。
回复