查看当前登陆的用户
$ who
loongson tty7 2012-04-27 08:58 (:0)
loongson pts/0 2012-04-27 09:00 (:0.0)
loongson pts/1 2012-04-27 09:00 (:0.0)
loongson pts/2 2012-04-27 09:15 (:0.0)
$ finger
Login Name Tty Idle Login Time Office Office Phone
loongson loongson tty7 12 Apr 27 08:58 (:0)
loongson loongson pts/0 4 Apr 27 09:00 (:0.0)
loongson loongson pts/1 Apr 27 09:00 (:0.0)
查看用户的信息
$ finger loongson
Login: loongson Name: loongson
Directory: /home/loongson Shell: /bin/bash
On since Fri Apr 27 08:58 (CST) on tty7 from :0
13 minutes 52 seconds idle
On since Fri Apr 27 09:00 (CST) on pts/0 from :0.0
5 minutes 50 seconds idle
On since Fri Apr 27 09:00 (CST) on pts/1 from :0.0
No mail.
No Plan
查看用户所属组别
$ groups loongson
loongson : loongson adm dialout cdrom plugdev lpadmin admin sambashare libvirtd
添加用户到指定组:
# usermod -a -G testgroup loongson
阅读(10070) | 评论(0) | 转发(0) |