Name | Modified | Size | Downloads / Week |
---|---|---|---|
xc-1.5.1.1.tar.bz2 | 2018-05-30 | 190.4 kB | |
xc-1.5.1.tar.bz2 | 2018-05-20 | 191.7 kB | |
xc-1.5.tar.gz | 2017-10-15 | 203.3 kB | |
xc-1.4.tar.xz | 2017-08-08 | 166.1 kB | |
xc-1.3.tar.bz2 | 2017-06-10 | 170.2 kB | |
xc-1.2.tar.bz2 | 2012-10-21 | 169.6 kB | |
xc-1.1.tar.bz2 | 2012-10-12 | 167.2 kB | |
xc-1.0.tar.bz2 | 2012-09-08 | 166.6 kB | |
xc-0.9.tar.bz2 | 2012-09-03 | 165.5 kB | |
README | 2012-09-02 | 2.0 kB | |
Totals: 10 Items | 1.6 MB | 0 |
xc a simple and handy substitute to sudo. See the INSTALL file for installing this software Synopsis xc [id] Description xc (eXecute Command) executes a command as another user. xc reads the file /etc/xc.conf, that has the same syntax as /etc/passwd, i.e. one line per item, and each field is separated by a colon ':'. A line starting with a '#' is ignored (comment). The file must be owned by root, group root, and only be readable by them. r--r----- The syntax of an item is as follows: id:access:user:command[:comment] id: an identifier for the command. Alphanumeric and '_' only. 16 characters max. access: if empty, the command can be executed by everyone. Otherwise, access can be any user, or any group if prepended with a '%'. user: the command will be executed as this user. If empty, root will be used instead. command: any shell command with its arguments. Notice that the full path of the command must be given. E.g. /bin/mount instead of mount. comment: an optional and arbitrary comment. xc executed without any argument will only list the ids (with its comment) available to the current user. Executed with a known id, xc will run the corresponding command if the current user is accepted by the given access. Example of a /etc/xc.conf file: # the users in group 'users' have the right to mount the CDROM mntcd:%users::/bin/mount /dev/scd0 /mnt/cdrom: Mount the cd # and umount it umtcd:%users::/bin/umount /mnt/cdrom # everyone has the right to start postgres pg_start::postgres:/usr/bin/pg_ctl start:Start PostgreSQL database # but only john can stop it. pg_stop:john:postgres:/usr/bin/pg_ctl stop Start postgres: xc pg_start Written by Christophe Gros skylendar@yahoo.com. Copyright (C) 2012 Christophe Gros. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.