Sudo

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • Avatar de Usuario
  • Registrado: May 22, 2004
  • Mensajes: 3415
  • Loc: Richland, WA
  • Status: Offline

Nota Enero 21st, 2008, 12:28 pm

He estado leyendo y en torno a una gran cantidad de personas parecen creer que el uso de sudo mala practive introduce en la ejecución de linux, ¿Cuál es tu opinión?

Soy un novato cuando se trata de linux, a lo largo de los años he jugado un rato con él y yo hemos tocado realmente sólo dos distribuidores, Ubuntu y Fedora Core. He instalado CentOS una vez pero nunca volvió a ella.

He intentado correr linux en mi máquina principal, pero no pude salir de mi IDE favorito, PHP Designer de MPSOFTWARE. (Todavía tengo en mi disco duro, pero tras la instalación de ventanas He perdido larvas, por lo que tendrá que reinstalar larvas en algún momento.)

Im estudiando la creación de una pequeña máquina para correr un servidor linux liberación de algunos de distribuidor, se inclina hacia Ubuntu sólo porque tengo la más práctica de la misma.

Sin embargo, antes de hacerlo me gustaría saber su opción por Sudo.
#define NULL (::rand() % 2)
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Enero 21st, 2008, 12:28 pm

  • kc0tma
  • o|||||||o
  • Web Master
  • Avatar de Usuario
  • Registrado: Jul 20, 2007
  • Mensajes: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Nota Enero 21st, 2008, 1:47 pm

Sudo es útil porque si usted entra en el sistema como root, es fácil de tornillo hasta algo bastante malo.

Pero, por otra parte, uno de nuestros servidores sombrero rojo en el trabajo tiene una aplicación para la nómina cosas, y el pueblo básicamente telnet al servidor para que lo ejecutara. En caso de que se enteró de sudo, podrían ejecutar comandos no queremos que hagan.

Así que en mi opinión, no me gusta en especial sudo. I tolerar o porque mi Mac OS X, pero si tuviera la posibilidad de elegir me gustaría permanecer lejos de él.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • AnarchY SI
  • Web Master
  • Web Master
  • Avatar de Usuario
  • Registrado: Oct 30, 2004
  • Mensajes: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Nota Enero 21st, 2008, 6:10 pm

sudo es muy útil si la única persona que acceda al servidor (o computadora) es usted. su no conectado a Internet, su no al servicio de una empresa, etc, pero si su servidor está conectado a Internet y una cuenta de usuario normal se cortó porque tiene una contraseña débil y que cuenta forma parte del grupo sudoers, su servidor es effed = [
Usted puede inhabilitar sudoing en ubuntu, sin embargo, si todavía quería utilizar ese sistema operativo ..
Imagen
"In a world without walls and fences, who needs Windows and Gates?"
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Enero 21st, 2008, 8:05 pm

Mientras theres una sola persona que puede usarlo, su gran.
Strong with this one, the sudo is.
  • AnarchY SI
  • Web Master
  • Web Master
  • Avatar de Usuario
  • Registrado: Oct 30, 2004
  • Mensajes: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Nota Enero 21st, 2008, 9:34 pm

Quote:
..., Su gran.

eh .. ID de acuerdo. para mí, su menos molesto para entrar en su, contraseña, todos los comandos i se desea ejecutar con privilegios elevados que tener que recordar a todos y cada uno de prefacio comando con sudo ..
Imagen
"In a world without walls and fences, who needs Windows and Gates?"
  • spork
  • Brewmaster
  • Silver Member
  • Avatar de Usuario
  • Registrado: Sep 22, 2003
  • Mensajes: 6128
  • Loc: Seattle, WA
  • Status: Offline

Nota Enero 21st, 2008, 10:33 pm

http://xkcd.com/149/

:lol:

Y tengo que estar de acuerdo con SI a este:
AnarchY SI escribió:
para mí, su menos molesto para entrar en su, contraseña, todos los comandos i se desea ejecutar con privilegios elevados que tener que recordar a todos y cada uno de prefacio comando con sudo ..
The Beer Monocle. Classy.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • Avatar de Usuario
  • Registrado: May 22, 2004
  • Mensajes: 3415
  • Loc: Richland, WA
  • Status: Offline

Nota Enero 22nd, 2008, 8:54 am

lol, mi nuevo favorito de historietas.

http://xkcd.com/123/
#define NULL (::rand() % 2)
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Enero 22nd, 2008, 10:41 am

AnarchY SI escribió:
Quote:
..., Su gran.

eh .. ID de acuerdo. para mí, su menos molesto para entrar en su, contraseña, todos los comandos i se desea ejecutar con privilegios elevados que tener que recordar a todos y cada uno de prefacio comando con sudo ..


Se me ayuda a recordar los comandos que requieren super usuario privledges.
Strong with this one, the sudo is.
  • AnarchY SI
  • Web Master
  • Web Master
  • Avatar de Usuario
  • Registrado: Oct 30, 2004
  • Mensajes: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Nota Enero 23rd, 2008, 7:21 am

spork escribió:
http://xkcd.com/149/

que los recibió mi voto. la centrifugación es bastante hasta allí Tho ..
Imagen
"In a world without walls and fences, who needs Windows and Gates?"
  • Daemonguy
  • Moderator
  • Web Master
  • Avatar de Usuario
  • Registrado: Ene 23, 2004
  • Mensajes: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Nota Enero 23rd, 2008, 9:24 am

Sudo no te protegen de los mismos errores como root. De manera efectiva en todo el sudoers se hace como root (o como denota el usuario).

Lo que hace es proporcionar al administrador con una lista de lo que hizo cuando mando. Si alguien puede acceder al sistema como root, entonces usted no tiene registro de que el mando que realizan.

Además, puede limitar el tipo, profundidad y variedad de ejecutables sudo tiene permiso para funcionar. Hasta el nivel de grupo también.

Cada sistema * nix pueden emplear sudo.

No existen para hacer la vida más fácil a los usuarios - que existe para hacer la vida más fácil a los administradores. :)

Ésta es la versión en pocas palabras. Si realmente quieres que discutir en profundidad, lo haré.
"It's always a long day, 86,400 won't fit into a short."
  • kc0tma
  • o|||||||o
  • Web Master
  • Avatar de Usuario
  • Registrado: Jul 20, 2007
  • Mensajes: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Nota Enero 23rd, 2008, 9:42 am

Daemonguy escribió:
Si alguien puede acceder al sistema como root, entonces usted no tiene registro de que el mando que realizan.


Pero nadie, pero el administrador (s) que debe tener la contraseña de root. Si tiene la gente de acceder al sistema como root en lugar de con sus propias credenciales, que esta pidiendo problemas.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Enero 23rd, 2008, 9:51 am

Daemonguy escribió:
Ésta es la versión en pocas palabras. Si realmente quieres que discutir en profundidad, lo haré.


Youve me interesó.

No hubo una sola cosa en su puesto que yo ya sabía. :D
Strong with this one, the sudo is.
  • AnarchY SI
  • Web Master
  • Web Master
  • Avatar de Usuario
  • Registrado: Oct 30, 2004
  • Mensajes: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Nota Enero 23rd, 2008, 10:09 am

kc0tma escribió:
Pero nadie, pero el administrador (s) que debe tener la contraseña de root. Si tiene la gente de acceder al sistema como root en lugar de con sus propias credenciales, que esta pidiendo problemas.

esa es la razón por la cual no agregar a nadie cuyo no un administrador para el archivo sudoers ..
si no está en el fichero sudoers, puede no sudo>. <
Imagen
"In a world without walls and fences, who needs Windows and Gates?"
  • Daemonguy
  • Moderator
  • Web Master
  • Avatar de Usuario
  • Registrado: Ene 23, 2004
  • Mensajes: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Nota Enero 23rd, 2008, 4:24 pm

joebert escribió:
Daemonguy escribió:
Eso es la versión de pocas palabras. Si realmente quieres que discutir en profundidad, lo haré.


Youve consiguió mi atención.

No había una sola cosa en tu mensaje que yo ya sabía. :D

Jeh.

Bueno, ¿qué más puedo tirar como las perlas de sabiduría?

"Sudo" significa una de dos cosas: "Super Usuario Do" o "sustituto usuario hacer" las razones que se convertirá no appare.

Aunque la mayoría de la gente atributo sudo para ejecutar comandos de la raíz (o el super usuario), también se utiliza para permitir el uso privilegiado de los nombres de otra cuenta (es decir, los usuarios, los propietarios de ejemplo y los identificadores de aplicación).
Como ejemplo, un proceso que necesita para funcionar como un particular el acceso a ello, decir "widget" para interactuar adecuadamente con otro proceso, o contratar a un proceso con el permiso correspondiente establece empleados.

Ahora, en este caso, técnicamente, estamos sudoing el comando su (usuario cambiar) por lo que el argumento podría ser que entonces (SUDO) es simplemente elevar el privilegio de otro ejecutable. Es una diferencia sutil en la semántica, como sudo garantizar un registro adecuado del comando su nota y el ID de usuario se ha vuelto. En otras palabras, que el usuario pueda actuar en la capacidad de un super usuario para cambiar a otro ID de usuario. Yo sostengo que el más complicado que eso, y los dos trabajan en armonía y con un propósito diferente al stand-alone. Eso, sin embargo, es una cuestión de opinión. gif "alt =";)" title =" Wink "/>

La historia (y perdona mi falta de memoria y por lo tanto faltan los detalles exigentes soy muy conocido por) del comando se remonta a SUNY en los años 80. Sin embargo, es actualmente gestionado por el equipo de OpenBSD dev - quién exactamente se me escapa. Sé que es distribuido bajo la licencia BSD.

Normalmente, la vida de archivo de configuración en / etc / sudoers. Su bastante largo y puede ser configurado para permitir una cantidad casi ilimitada de atributos de permiso totalmente específicos. Puede ser tan complejo o tan genéricos como tiene que ser de un usuario por cada usuario o grupo por grupo.

Todos los casos se registran, incluidos los intentos fallidos o los intentos de acceso de los ejecutables no incluidos en el que los usuarios o grupos de configuración.
Además, no requiere conocimiento previo de las contraseñas otro sistema, el usuario utiliza su contraseña de acceso para entrar en este estado de permiso de acceso elevado.

Heres un recorrido por algunas de las banderas utilizadas cuando se llama al shell de comandos.

Código: [ Select ]
OPTIONS
    sudo accepts the following command line options:

    -V The -V (version) option causes sudo to print the version number and exit. If the invoking user is already root the -V option will print out a list of the defaults sudo
      was compiled with as well as the machine's local network addresses.

    -l The -l (list) option will list out the allowed (and forbidden) commands for the user on the current host.

    -L The -L (list defaults) option will list out the parameters that may be set in a Defaults line along with a short description for each. This option is useful in conjunc­
      tion with grep(1).

    -h The -h (help) option causes sudo to print a usage message and exit.

    -v If given the -v (validate) option, sudo will update the user's timestamp, prompting for the user's password if necessary. This extends the sudo timeout for another 5
      minutes (or whatever the timeout is set to in sudoers) but does not run a command.

    -k The -k (kill) option to sudo invalidates the user's timestamp by setting the time on it to the epoch. The next time sudo is run a password will be required. This option
      does not require a password and was added to allow a user to revoke sudo permissions from a .logout file.

    -K The -K (sure kill) option to sudo removes the user's timestamp entirely. Likewise, this option does not require a password.

    -b The -b (background) option tells sudo to run the given command in the background. Note that if you use the -b option you cannot use shell job control to manipulate the
      process.

    -p The -p (prompt) option allows you to override the default password prompt and use a custom one. The following percent (‘%') escapes are supported:

      %u   expanded to the invoking user's login name

      %U   expanded to the login name of the user the command will be run as (defaults to root)

      %h   expanded to the local hostname without the domain name

      %H   expanded to the local hostname including the domain name (on if the machine's hostname is fully qualified or the fqdn sudoers option is set)

      %%   two consecutive % characters are collaped into a single % character

    -c The -c (class) option causes sudo to run the specified command with resources limited by the specified login class. The class argument can be either a class name as
      defined in /etc/login.conf, or a single '-' character. Specifying a class of - indicates that the command should be run restricted by the default login capabilities for
      the user the command is run as. If the class argument specifies an existing user class, the command must be run as root, or the sudo command must be run from a shell
      that is already root. This option is only available on systems with BSD login classes where sudo has been configured with the --with-logincap option.

    -a The -a (authentication type) option causes sudo to use the specified authentication type when validating the user, as allowed by /etc/login.conf. The system administra­
      tor may specify a list of sudo-specific authentication methods by adding an "auth-sudo" entry in /etc/login.conf. This option is only available on systems that support
      BSD authentication where sudo has been configured with the --with-bsdauth option.

    -u The -u (user) option causes sudo to run the specified command as a user other than root. To specify a uid instead of a username, use #uid.

    -s The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).

    -H The -H (HOME) option sets the HOME environment variable to the homedir of the target user (root by default) as specified in passwd(5). By default, sudo does not modify
      HOME.

    -P The -P (preserve group vector) option causes sudo to preserve the user's group vector unaltered. By default, sudo will initialize the group vector to the list of groups
      the target user is in. The real and effective group IDs, however, are still set to match the target user.

    -r The -r (role) option causes the new (SELinux) security context to have the role specified by ROLE.

    -t The -t (type) option causes the new (SELinux) security context to have the have the type (domain) specified by TYPE. If no type is specified, the default type is derived
      from the specified role.

    -S The -S (stdin) option causes sudo to read the password from standard input instead of the terminal device.

    -- The -- flag indicates that sudo should stop processing command line arguments. It is most useful in conjunction with the -s flag.
  1. OPTIONS
  2.     sudo accepts the following command line options:
  3.     -V The -V (version) option causes sudo to print the version number and exit. If the invoking user is already root the -V option will print out a list of the defaults sudo
  4.       was compiled with as well as the machine's local network addresses.
  5.     -l The -l (list) option will list out the allowed (and forbidden) commands for the user on the current host.
  6.     -L The -L (list defaults) option will list out the parameters that may be set in a Defaults line along with a short description for each. This option is useful in conjunc­
  7.       tion with grep(1).
  8.     -h The -h (help) option causes sudo to print a usage message and exit.
  9.     -v If given the -v (validate) option, sudo will update the user's timestamp, prompting for the user's password if necessary. This extends the sudo timeout for another 5
  10.       minutes (or whatever the timeout is set to in sudoers) but does not run a command.
  11.     -k The -k (kill) option to sudo invalidates the user's timestamp by setting the time on it to the epoch. The next time sudo is run a password will be required. This option
  12.       does not require a password and was added to allow a user to revoke sudo permissions from a .logout file.
  13.     -K The -K (sure kill) option to sudo removes the user's timestamp entirely. Likewise, this option does not require a password.
  14.     -b The -b (background) option tells sudo to run the given command in the background. Note that if you use the -b option you cannot use shell job control to manipulate the
  15.       process.
  16.     -p The -p (prompt) option allows you to override the default password prompt and use a custom one. The following percent (‘%') escapes are supported:
  17.       %u   expanded to the invoking user's login name
  18.       %U   expanded to the login name of the user the command will be run as (defaults to root)
  19.       %h   expanded to the local hostname without the domain name
  20.       %H   expanded to the local hostname including the domain name (on if the machine's hostname is fully qualified or the fqdn sudoers option is set)
  21.       %%   two consecutive % characters are collaped into a single % character
  22.     -c The -c (class) option causes sudo to run the specified command with resources limited by the specified login class. The class argument can be either a class name as
  23.       defined in /etc/login.conf, or a single '-' character. Specifying a class of - indicates that the command should be run restricted by the default login capabilities for
  24.       the user the command is run as. If the class argument specifies an existing user class, the command must be run as root, or the sudo command must be run from a shell
  25.       that is already root. This option is only available on systems with BSD login classes where sudo has been configured with the --with-logincap option.
  26.     -a The -a (authentication type) option causes sudo to use the specified authentication type when validating the user, as allowed by /etc/login.conf. The system administra­
  27.       tor may specify a list of sudo-specific authentication methods by adding an "auth-sudo" entry in /etc/login.conf. This option is only available on systems that support
  28.       BSD authentication where sudo has been configured with the --with-bsdauth option.
  29.     -u The -u (user) option causes sudo to run the specified command as a user other than root. To specify a uid instead of a username, use #uid.
  30.     -s The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).
  31.     -H The -H (HOME) option sets the HOME environment variable to the homedir of the target user (root by default) as specified in passwd(5). By default, sudo does not modify
  32.       HOME.
  33.     -P The -P (preserve group vector) option causes sudo to preserve the user's group vector unaltered. By default, sudo will initialize the group vector to the list of groups
  34.       the target user is in. The real and effective group IDs, however, are still set to match the target user.
  35.     -r The -r (role) option causes the new (SELinux) security context to have the role specified by ROLE.
  36.     -t The -t (type) option causes the new (SELinux) security context to have the have the type (domain) specified by TYPE. If no type is specified, the default type is derived
  37.       from the specified role.
  38.     -S The -S (stdin) option causes sudo to read the password from standard input instead of the terminal device.
  39.     -- The -- flag indicates that sudo should stop processing command line arguments. It is most useful in conjunction with the -s flag.


Hows eso?
"It's always a long day, 86,400 won't fit into a short."
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Enero 23rd, 2008, 9:11 pm

Hombre, yo estaba lejos de pensar en una sola persona debería ser capaz de usarlo.
Tal vez sería mejor pensar en ella como si sólo una persona podría configurar ello.

Por otra parte, me acaba de enterar somthing otra nueva. Es una mala idea para chown / etc / sudoers a raíz: yourgroup para que usted pueda ver en ello.
Quote:
sudo: / etc / sudoers es propiedad de gid 1000, debe ser 0


/ / Edit - Una muy mala idea. Parece que los préstamos Im un monitor tomarrow.
Strong with this one, the sudo is.
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Enero 23rd, 2008, 9:11 pm

Publicar Información

  • Total de mensajes en este tema: 26 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 53 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC