分页: 1 / 1

[问题]gksu和sudo命令有什么不同?[已解决]

发表于 : 2007-04-02 17:37
applnk
gksu和sudo命令有什么不同?

发表于 : 2007-04-02 17:41
skyx
以下全为听说,没有学习过,也没查过相关资讯。

gksu 用于启用gui程式, sudo 用于CLI。

听说 sudo gui程式,会出问题,为什么会出问题,会出什么问题,不知道,

倒底有什么区别,没感觉到。

比如 sudo nautilus 和gksu nautilus

除了password输入方式不同外,没什么区别

发表于 : 2007-04-02 17:41
飞雪笑
不晓得哈,你 man sudo 再 man gksu不久可以了吗
英文不好的话可以sudo --help 再 gksu --help 比较一下好像也可以啊
我刚刚把ubuntu给格了,现在就一个xp,呵呵,没有试验的地方

发表于 : 2007-04-02 17:46
skyx
sudo allows a permitted user to execute a command as the superuser or
another user, as specified in the sudoers file. The real and effective
uid and gid are set to match those of the target user as specified in
the passwd file and the group vector is initialized based on the group
file (unless the -P option was specified). If the invoking user is
root or if the target user is the same as the invoking user, no pass‐
word is required. Otherwise, sudo requires that users authenticate
themselves with a password by default (NOTE: in the default configura‐
tion this is the user’s password, not the root password). Once a user
has been authenticated, a timestamp is updated and the user may then
use sudo without a password for a short period of time (15 minutes
unless overridden in sudoers).

When invoked as sudoedit, the -e option (described below), is implied.

sudo determines who is an authorized user by consulting the file
/etc/sudoers. By giving sudo the -v flag a user can update the time
stamp without running a command. The password prompt itself will also
time out if the user’s password is not entered within 0 minutes (unless
overridden via sudoers).

If a user who is not listed in the sudoers file tries to run a command
via sudo, mail is sent to the proper authorities, as defined at config‐
ure time or in the sudoers file (defaults to root). Note that the mail
will not be sent if an unauthorized user tries to run sudo with the -l
or -v flags. This allows users to determine for themselves whether or
not they are allowed to use sudo.

If sudo is run by root and the SUDO_USER environment variable is set,
sudo will use this value to determine who the actual user is. This can
be used by a user to log commands through sudo even when a root shell
has been invoked. It also allows the -e flag to remain useful even
when being run via a sudo-run script or program. Note however, that
the sudoers lookup is still done for root, not the user specified by
SUDO_USER.
sudo can log both successful and unsuccessful attempts (as well as
errors) to syslog(3), a log file, or both. By default sudo will log
via syslog(3) but this is changeable at configure time or via the sudo‐
ers file.

发表于 : 2007-04-02 17:48
skyx
sudo nautilus

gksu nautilus

二者在终端中的提示信息的确不同,后者多一点内容。

发表于 : 2007-04-05 4:38
applnk
skyx 写了:以下全为听说,没有学习过,也没查过相关资讯。

gksu 用于启用gui程式, sudo 用于CLI

听说 sudo gui程式,会出问题,为什么会出问题,会出什么问题,不知道,

倒底有什么区别,没感觉到。

比如 sudo nautilus 和gksu nautilus

除了password输入方式不同外,没什么区别
我怎么知道是 gui 程式还是用于 CLI ?一般程序应该是什么程式?

sudo gui 程式,会出问题,那么是不是永远用 gksu 启动 guiCLI 程式就不会出问题了?

发表于 : 2007-04-05 13:08
BigSnake.NET
applnk 写了:
skyx 写了:以下全为听说,没有学习过,也没查过相关资讯。

gksu 用于启用gui程式, sudo 用于CLI

听说 sudo gui程式,会出问题,为什么会出问题,会出什么问题,不知道,

倒底有什么区别,没感觉到。

比如 sudo nautilus 和gksu nautilus

除了password输入方式不同外,没什么区别
我怎么知道是 gui 程式还是用于 CLI ?一般程序应该是什么程式?

sudo gui 程式,会出问题,那么是不是永远用 gksu 启动 guiCLI 程式就不会出问题了?
GUI = Graphical User Interface 就是有图形界面的
CLI = Command Line Interface 就是命令行的东东

发表于 : 2007-04-05 15:11
applnk
BigSnake.NET 写了:GUI = Graphical User Interface 就是有图形界面的
CLI = Command Line Interface 就是命令行的东东
原来如此,谢谢了!

[问题]gksu(问题已解决)

发表于 : 2007-10-24 9:50
haosir2
我用sudo运行GUI和CLI都没问题,用gksu运行GUI也没问题,用gksu运行CLI也没问题(用apt和nano作的实验),但一个脚本,里面使用了CLI,sudo没问题,gksu却出现下列错误:
脚本没运行完,出现下列信息:

*** glibc detected *** xrgsu: free(): invalid pointer: 0x080577a8 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7cd1d65]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7cd5800]
/usr/lib/libstdc++.so.5(_ZdlPv+0x23)[0xb7e8aa33]
/usr/lib/libstdc++.so.5(_ZdaPv+0x1f)[0xb7e8aa8f]
xrgsu[0x804c54a]
xrgsu[0x804cb2a]
xrgsu[0x804c076]
xrgsu[0x804a6d1]
xrgsu[0x804a63d]
/lib/tls/i686/cmov/libpthread.so.0[0xb7db746b]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0xb7d3b73e]
======= Memory map: ========
08048000-08054000 r-xp 00000000 08:0b 357072 /bin/xrgsu
08054000-08055000 rw-p 0000c000 08:0b 357072 /bin/xrgsu
08055000-08077000 rw-p 08055000 00:00 0 [heap]
b1c5a000-b1c5b000 ---p b1c5a000 00:00 0
b1c5b000-b245b000 rw-p b1c5b000 00:00 0
b245b000-b245c000 ---p b245b000 00:00 0
b245c000-b2c5c000 rw-p b245c000 00:00 0
b2c5c000-b2c5d000 ---p b2c5c000 00:00 0
b2c5d000-b345d000 rw-p b2c5d000 00:00 0
b345d000-b345e000 ---p b345d000 00:00 0
b345e000-b3c5e000 rw-p b345e000 00:00 0
b3c5e000-b3c5f000 ---p b3c5e000 00:00 0
b3c5f000-b445f000 rw-p b3c5f000 00:00 0
b445f000-b4460000 ---p b445f000 00:00 0
b4460000-b4c60000 rw-p b4460000 00:00 0
b4c60000-b4c61000 ---p b4c60000 00:00 0
b4c61000-b5461000 rw-p b4c61000 00:00 0
b5461000-b5462000 ---p b5461000 00:00 0
b5462000-b5c62000 rw-p b5462000 00:00 0
b5c62000-b5c63000 ---p b5c62000 00:00 0
b5c63000-b6463000 rw-p b5c63000 00:00 0
b6463000-b6464000 ---p b6463000 00:00 0
b6464000-b6c64000 rw-p b6464000 00:00 0
b6c64000-b6c65000 ---p b6c64000 00:00 0
b6c65000-b7465000 rw-p b6c65000 00:00 0
b7465000-b7466000 ---p b7465000 00:00 0
b7466000-b7c68000 rw-p b7466000 00:00 0
b7c68000-b7dac000 r-xp 00000000 08:0b 794997 /lib/tls/i686/cmov/libc-2.6.1.so
b7dac000-b7dad000 r--p 00143000 08:0b 794997 /lib/tls/i686/cmov/libc-2.6.1.so
b7dad000-b7daf000 rw-p 00144000 08:0b 794997 /lib/tls/i686/cmov/libc-2.6.1.so
b7daf000-b7db2000 rw-p b7daf000 00:00 0
b7db2000-b7dc6000 r-xp 00000000 08:0b 795011 /lib/tls/i686/cmov/libpthread-2.6.1.so
b7dc6000-b7dc8000 rw-p 00013000 08:0b 795011 /lib/tls/i686/cmov/libpthread-2.6.1.so
b7dc8000-b7dca000 rw-p b7dc8000 00:00 0
b7dca000-b7dd4000 r-xp 00000000 08:0b 795038 /lib/libgcc_s.so.1
b7dd4000-b7dd5000 rw-p 0000a000 08:0b 795038 /lib/libgcc_s.so.1
b7dd5000-b7df8000 r-xp 00000000 08:0b 795001 /lib/tls/i686/cmov/libm-2.6.1.so
b7df8000-b7dfa000 rw-p 00023000 08:0b 795001 /lib/tls/i686/cmov/libm-2.6.1.so
b7dfa000-b7eaa000 r-xp 00000000 08:0b 851636 /usr/lib/libstdc++.so.5.0.7
b7eaa000-b7eaf000 rw-p 000af000 08:0b 851636 /usr/lib/libstdc++.so.5.0.7
b7eaf000-b7eb4000 rw-p b7eaf000 00:00 0
b7eb4000-b7edc000 r-xp 00000000 08:0b 850660 /usr/lib/libpcap.so.0.9.7
b7edc000-b7edd000 rw-p 00027000 08:0b 850660 /usr/lib/libpcap.so.0.9.7
b7edd000-b7edf000 rw-p b7edd000 00:00 0
b7ee9000-b7eec000 rw-p b7ee9000 00:00 0
b7eec000-b7f06000 r-xp 00000000 08:0b 796610 /lib/ld-2.6.1.so
b7f06000-b7f08000 rw-p 00019000 08:0b 796610 /lib/ld-2.6.1.so
bfdab000-bfdc0000 rw-p bfdab000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]

问题解决,原来我运行这个程序时已经运行一个了。

Re: [问题]gksu(问题已解决)

发表于 : 2007-10-31 19:10
yuffey
明白了。
haosir2 写了:我用sudo运行GUI和CLI都没问题,用gksu运行GUI也没问题,用gksu运行CLI也没问题(用apt和nano作的实验),但一个脚本,里面使用了CLI,sudo没问题,gksu却出现下列错误:
脚本没运行完,出现下列信。[/color][/size]