Shell Es El Entorno Grafico Como Vamos a Ingresar

26
Shell es el entorno grafico como vamos a ingresar [root@caguate ~]# ls -l total 20 -rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg -rw-r--r--. 1 root root 8823 feb 21 10:44 install.log -rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog [root@caguate ~]# ls -lt total 20 -rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg -rw-r--r--. 1 root root 8823 feb 21 10:44 install.log -rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog [root@caguate ~]# ls -lta total 60 dr-xr-xr-x. 22 root root 4096 feb 28 08:32 .. drwx------. 2 root root 4096 feb 28 08:16 .ssh dr-xr-x---. 3 root root 4096 feb 28 08:16 . -rw-------. 1 root root 3144 feb 23 05:35 .viminfo -rw-------. 1 root root 1170 feb 21 13:40 .bash_history -rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg -rw-r--r--. 1 root root 8823 feb 21 10:44 install.log -rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog -rw-r--r--. 1 root root 18 may 20 2009 .bash_logout -rw-r--r--. 1 root root 176 may 20 2009 .bash_profile -rw-r--r--. 1 root root 129 dic 3 2004 .tcshrc

Transcript of Shell Es El Entorno Grafico Como Vamos a Ingresar

Page 1: Shell Es El Entorno Grafico Como Vamos a Ingresar

Shell es el entorno grafico como vamos a ingresar

[root@caguate ~]# ls -l

total 20

-rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg

-rw-r--r--. 1 root root 8823 feb 21 10:44 install.log

-rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog

[root@caguate ~]# ls -lt

total 20

-rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg

-rw-r--r--. 1 root root 8823 feb 21 10:44 install.log

-rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog

[root@caguate ~]# ls -lta

total 60

dr-xr-xr-x. 22 root root 4096 feb 28 08:32 ..

drwx------. 2 root root 4096 feb 28 08:16 .ssh

dr-xr-x---. 3 root root 4096 feb 28 08:16 .

-rw-------. 1 root root 3144 feb 23 05:35 .viminfo

-rw-------. 1 root root 1170 feb 21 13:40 .bash_history

-rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg

-rw-r--r--. 1 root root 8823 feb 21 10:44 install.log

-rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog

-rw-r--r--. 1 root root 18 may 20 2009 .bash_logout

-rw-r--r--. 1 root root 176 may 20 2009 .bash_profile

-rw-r--r--. 1 root root 129 dic 3 2004 .tcshrc

-rw-r--r--. 1 root root 176 sep 22 2004 .bashrc

Page 2: Shell Es El Entorno Grafico Como Vamos a Ingresar

-rw-r--r--. 1 root root 100 sep 22 2004 .cshrc

Buscar un argumento

[root@caguate ~]# ls -lt /tmp

total 44

-rw-------. 1 root root 43056 feb 23 05:41 yum_save_tx-2015-02-23-05-41k8CV2V.yumtx

-rw-------. 1 root root 0 feb 21 10:41 yum.log

[root@caguate ~]# ls /var -l

total 60

drwxr-xr-x. 4 root root 4096 feb 21 10:42 cache

drwxr-xr-x. 3 root root 4096 feb 21 10:43 db

drwxr-xr-x. 3 root root 4096 feb 21 10:43 empty

drwxr-xr-x. 2 root root 4096 sep 23 2011 games

drwxr-xr-x. 15 root root 4096 feb 21 10:43 lib

drwxr-xr-x. 2 root root 4096 sep 23 2011 local

drwxrwxr-x. 5 root lock 4096 feb 21 10:43 lock

drwxr-xr-x. 3 root root 4096 feb 28 08:32 log

lrwxrwxrwx. 1 root root 10 feb 21 10:41 mail -> spool/mail

drwxr-xr-x. 2 root root 4096 sep 23 2011 nis

drwxr-xr-x. 2 root root 4096 sep 23 2011 opt

drwxr-xr-x. 2 root root 4096 sep 23 2011 preserve

drwxr-xr-x. 11 root root 4096 feb 28 08:33 run

drwxr-xr-x. 8 root root 4096 feb 21 10:42 spool

drwxrwxrwt. 2 root root 4096 feb 21 11:54 tmp

drwxr-xr-x. 2 root root 4096 sep 23 2011 yp

Page 3: Shell Es El Entorno Grafico Como Vamos a Ingresar

[root@caguate ~]# yum info man-pages-es

Complementos cargados:fastestmirror

Loading mirror speeds from cached hostfile

* base: mirror.uta.edu.ec

* extras: mirror.uta.edu.ec

* updates: mirror.uta.edu.ec

Paquetes disponibles

Nombre : man-pages-es

Arquitectura : noarch

Versión : 1.55

Lanzamiento : 14.el6

Tamaño : 1.6 M

Repositorio : base

Resumen : Spanish man pages from the Linux Documentation Project

URL : http://ditec.um.es/~piernas/manpages-es/

Licencia : IEEE

Descripción :This package contains the translation into Spanish of the English

: man-pages package. It is a beta release, so you can still find a

: lot of bugs. Contributions are welcome. For any doubt or

: suggestion about this release, send an e-mail to Juan Piernas

: Canovas <piernas at ditec.um.es>. In order to collaborate with the

: project, please visit http://es.tldp.org.

[root@caguate ~]# # Instalar Documentacion (manuales) de comandos

[root@caguate ~]# yum -y install man-pages-es

Complementos cargados:fastestmirror

Page 4: Shell Es El Entorno Grafico Como Vamos a Ingresar

Configurando el proceso de instalación

Loading mirror speeds from cached hostfile

* base: mirror.uta.edu.ec

* extras: mirror.uta.edu.ec

* updates: mirror.uta.edu.ec

Resolviendo dependencias

--> Ejecutando prueba de transacción

---> Package man-pages-es.noarch 0:1.55-14.el6 will be instalado

--> Procesando dependencias: man para el paquete: man-pages-es-1.55-14.el6.noarch

--> Ejecutando prueba de transacción

---> Package man.x86_64 0:1.6f-32.el6 will be instalado

--> Procesando dependencias: lzma para el paquete: man-1.6f-32.el6.x86_64

--> Ejecutando prueba de transacción

---> Package xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be instalado

--> Procesando dependencias: xz = 4.999.9-0.5.beta.20091007git.el6 para el paquete: xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64

--> Ejecutando prueba de transacción

---> Package xz.x86_64 0:4.999.9-0.5.beta.20091007git.el6 will be instalado

--> Resolución de dependencias finalizada

Dependencias resueltas

================================================================================

Paquete Arquitectura

Versión Repositorio

Tamaño

================================================================================

Page 5: Shell Es El Entorno Grafico Como Vamos a Ingresar

Instalando:

man-pages-es noarch 1.55-14.el6 base 1.6 M

Instalando para las dependencias:

man x86_64 1.6f-32.el6 base 263 k

xz x86_64 4.999.9-0.5.beta.20091007git.el6 base 137 k

xz-lzma-compat x86_64 4.999.9-0.5.beta.20091007git.el6 base 16 k

Resumen de la transacción

================================================================================

Instalar 4 Paquete(s)

Tamaño total de la descarga: 2.0 M

Tamaño instalado: 2.3 M

Descargando paquetes:

(1/4): man-1.6f-32.el6.x86_64.rpm | 263 kB 00:00

(2/4): man-pages-es-1.55-14.el6.noarch.rpm | 1.6 MB 00:01

(3/4): xz-4.999.9-0.5.beta.20091007git.el6.x86_64.rpm | 137 kB 00:00

(4/4): xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x | 16 kB 00:00

--------------------------------------------------------------------------------

Total 734 kB/s | 2.0 MB 00:02

Ejecutando el rpm_check_debug

Ejecutando prueba de transacción

La prueba de transacción ha sido exitosa

Ejecutando transacción

Instalando : xz-4.999.9-0.5.beta.20091007git.el6.x86_64 1/4

Instalando : xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64 2/4

Instalando : man-1.6f-32.el6.x86_64 3/4

Page 6: Shell Es El Entorno Grafico Como Vamos a Ingresar

Instalando : man-pages-es-1.55-14.el6.noarch 4/4

Verifying : man-pages-es-1.55-14.el6.noarch 1/4

Verifying : man-1.6f-32.el6.x86_64 2/4

Verifying : xz-4.999.9-0.5.beta.20091007git.el6.x86_64 3/4

Verifying : xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64 4/4

Instalado:

man-pages-es.noarch 0:1.55-14.el6

Dependencia(s) instalada(s):

man.x86_64 0:1.6f-32.el6

xz.x86_64 0:4.999.9-0.5.beta.20091007git.el6

xz-lzma-compat.x86_64 0:4.999.9-0.5.beta.20091007git.el6

¡Listo!

[root@caguate ~]#

[root@caguate ~]# man ls

50 + shift + gr

Listar directories

Quien esta en el Sistema

Who

W

[root@caguate ~]# w

09:21:17 up 48 min, 4 users, load average: 0,00, 0,00, 0,00

USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT

root tty1 - 08:33 1:34 2.99s 0.00s man ls

Page 7: Shell Es El Entorno Grafico Como Vamos a Ingresar

root pts/0 192.168.0.108 08:38 41:53 0.04s 0.04s -bash

root pts/1 192.168.0.108 08:45 35:14 0.05s 0.05s -bash

root pts/2 192.168.0.106 08:47 0.00s 0.23s 0.04s w

control alt f1 para ver las pantallas

contrl d para salir de la sesión remota

[root@caguate ~]# cd /tmp

[root@caguate tmp]# cd

[root@caguate ~]# cd /etc/

[root@caguate etc]# pwd

/etc

[root@caguate etc]# cd /root/respaldos/

[root@caguate respaldos]# cp -r /etc .

[root@caguate respaldos]# ls -lt

total 4

drwxr-xr-x. 61 root root 4096 feb 28 09:42 etc

[root@caguate respaldos]#

Borrar en forma recursiva

[root@caguate respaldos]# rm -rf /root/respaldos/etc/

[root@caguate respaldos]# cp -r /etc/ /root/respaldos/

[root@caguate ~]# ls -LR /etc/ | grep history

History historial_comandos_28febrero2015.txt borrar2

Toutch historial_comandos_28febrero2015.txt borrar2

Page 8: Shell Es El Entorno Grafico Como Vamos a Ingresar

[root@caguate ~]# # archivos de usuarios y Grupos en Linux

[root@caguate ~]# ls -lt /etc/passwd /etc/shadow /etc/group /home/

----------. 1 root root 592 feb 21 10:44 /etc/shadow

-rw-r--r--. 1 root root 854 feb 21 10:44 /etc/passwd

-rw-r--r--. 1 root root 454 feb 21 10:43 /etc/group

/home/:

total 0

[root@caguate ~]#

[root@caguate ~]# more /etc/paswd

/etc/paswd: No existe el fichero o el directorio

[root@caguate ~]# more /etc/passwd

root:x:0:0:root:/root:/bin/bash

bin:x:1:1:bin:/bin:/sbin/nologin

daemon:x:2:2:daemon:/sbin:/sbin/nologin

adm:x:3:4:adm:/var/adm:/sbin/nologin

lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin

sync:x:5:0:sync:/sbin:/bin/sync

shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown

halt:x:7:0:halt:/sbin:/sbin/halt

mail:x:8:12:mail:/var/spool/mail:/sbin/nologin

uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin

operator:x:11:0:operator:/root:/sbin/nologin

games:x:12:100:games:/usr/games:/sbin/nologin

gopher:x:13:30:gopher:/var/gopher:/sbin/nologin

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

Page 9: Shell Es El Entorno Grafico Como Vamos a Ingresar

nobody:x:99:99:Nobody:/:/sbin/nologin

vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin

saslauth:x:499:76:Saslauthd user:/var/empty/saslauth:/sbin/nologin

postfix:x:89:89::/var/spool/postfix:/sbin/nologin

sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

[root@caguate ~]#

[root@caguate ~]# tail /etc/passwd

vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin

saslauth:x:499:76:Saslauthd user:/var/empty/saslauth:/sbin/nologin

postfix:x:89:89::/var/spool/postfix:/sbin/nologin

sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

israel:x:500:500::/home/israel:/bin/bash

edwin:x:501:501::/home/edwin:/bin/bash

cristian:x:502:502::/home/cristian:/bin/bash

Luis:x:503:503::/home/Luis:/bin/bash

Rodrigo:x:504:504::/home/Rodrigo:/bin/bash

Jose:x:505:505::/home/Jose:/bin/bash

[root@caguate ~]# tail -2 /etc/passwd

Rodrigo:x:504:504::/home/Rodrigo:/bin/bash

Jose:x:505:505::/home/Jose:/bin/bash

[root@caguate ~]# # Asignar claves a los usuarios

[root@caguate ~]# passwd israel

Cambiando la contraseña del usuario israel.

Nueva contraseña:

Page 10: Shell Es El Entorno Grafico Como Vamos a Ingresar

CONTRASEÑA INCORRECTA: Está basada en una palabra del diccionario.

Vuelva a escribir la nueva contraseña:

passwd: todos los tokens de autenticación se actualizaron exitosamente.

[root@caguate ~]# egrep "root|bin|halt|israel" /etc/passwd

root:x:0:0:root:/root:/bin/bash

bin:x:1:1:bin:/bin:/sbin/nologin

daemon:x:2:2:daemon:/sbin:/sbin/nologin

adm:x:3:4:adm:/var/adm:/sbin/nologin

lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin

sync:x:5:0:sync:/sbin:/bin/sync

shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown

halt:x:7:0:halt:/sbin:/sbin/halt

mail:x:8:12:mail:/var/spool/mail:/sbin/nologin

uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin

operator:x:11:0:operator:/root:/sbin/nologin

games:x:12:100:games:/usr/games:/sbin/nologin

gopher:x:13:30:gopher:/var/gopher:/sbin/nologin

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

nobody:x:99:99:Nobody:/:/sbin/nologin

vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin

saslauth:x:499:76:Saslauthd user:/var/empty/saslauth:/sbin/nologin

postfix:x:89:89::/var/spool/postfix:/sbin/nologin

sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

israel:x:500:500::/home/israel:/bin/bash

edwin:x:501:501::/home/edwin:/bin/bash

cristian:x:502:502::/home/cristian:/bin/bash

Page 11: Shell Es El Entorno Grafico Como Vamos a Ingresar

Luis:x:503:503::/home/Luis:/bin/bash

Rodrigo:x:504:504::/home/Rodrigo:/bin/bash

Jose:x:505:505::/home/Jose:/bin/bash

[root@caguate ~]#

[root@caguate ~]# usermod --help

Usage: usermod [options] LOGIN

Options:

-c, --comment COMMENT new value of the GECOS field

-d, --home HOME_DIR new home directory for the user account

-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE

-f, --inactive INACTIVE set password inactive after expiration

to INACTIVE

-g, --gid GROUP force use GROUP as new primary group

-G, --groups GROUPS new list of supplementary GROUPS

-a, --append append the user to the supplemental GROUPS

mentioned by the -G option without removing

him/her from other groups

-h, --help display this help message and exit

-l, --login NEW_LOGIN new value of the login name

-L, --lock lock the user account

-m, --move-home move contents of the home directory to the

new location (use only with -d)

-o, --non-unique allow using duplicate (non-unique) UID

-p, --password PASSWORD use encrypted password for the new password

-s, --shell SHELL new login shell for the user account

Page 12: Shell Es El Entorno Grafico Como Vamos a Ingresar

-u, --uid UID new UID for the user account

-U, --unlock unlock the user account

-Z, --selinux-user new SELinux user mapping for the user account

[root@caguate ~]# tail /etc/passwd

[root@caguate ~]# tail -6 /etc/passwd

israel:x:500:500::/home/israel:/bin/bash

edwin:x:501:501::/home/edwin:/bin/bash

cristian:x:502:502::/home/cristian:/bin/bash

Luis:x:503:503::/home/Luis:/bin/bash

Rodrigo:x:504:504::/home/Rodrigo:/bin/bash

Jose:x:505:505::/home/Jose:/bin/bash

[root@caguate ~]# # Cambiar opciones a los usuarios

[root@caguate ~]# usermod -c "Israel Pacheco" -s /sbin/nologin israel

[root@caguate ~]# usermod -c "Edwin Caguate" -s /sbin/nologin edwin

[root@caguate ~]# usermod -c "Rodrigo Garces" -s /sbin/nologin rodrigo

usermod: user 'rodrigo' does not exist

[root@caguate ~]# usermod -c "Rodrigo Garces" -s /sbin/nologin rodrigo

usermod: user 'rodrigo' does not exist

[root@caguate ~]# adduser rodrigo

[root@caguate ~]# usermod -c "Rodrigo Garces" -s /sbin/nologin rodrigo

[root@caguate ~]# usermod -c "cristian bautista" -s /sbin/nologin cristian

[root@caguate ~]# usermod -c "Luis Cevallosa" -s /sbin/nologin cristian

[root@caguate ~]# usermod -c "Jose Barahona" jose

usermod: user 'jose' does not exist

[root@caguate ~]# adduser jose

Page 13: Shell Es El Entorno Grafico Como Vamos a Ingresar

[root@caguate ~]# usermod -c "Jose Barahona" jose

[root@caguate ~]# tail -6 /etc/passwd

cristian:x:502:502:Luis Cevallosa:/home/cristian:/sbin/nologin

Luis:x:503:503::/home/Luis:/bin/bash

Rodrigo:x:504:504::/home/Rodrigo:/bin/bash

Jose:x:505:505::/home/Jose:/bin/bash

rodrigo:x:506:506:Rodrigo Garces:/home/rodrigo:/sbin/nologin

jose:x:507:507:Jose Barahona:/home/jose:/bin/bash

[root@caguate ~]# grep nin/bash /etc/passwd

[root@caguate ~]# grep bin/bash /etc/passwd

root:x:0:0:root:/root:/bin/bash

Luis:x:503:503::/home/Luis:/bin/bash

Rodrigo:x:504:504::/home/Rodrigo:/bin/bash

Jose:x:505:505::/home/Jose:/bin/bash

jose:x:507:507:Jose Barahona:/home/jose:/bin/bash

[root@caguate ~]# # Crear grupos de trabajo

[root@caguate ~]# groupadd usuarios

[root@caguate ~]# groupdel usuarios

[root@caguate ~]# grep israel /etc/passwd /etc/shadow /etc/group

/etc/passwd:israel:x:500:500:Israel Pacheco:/home/israel:/sbin/nologin

/etc/shadow:israel:$6$WYc4E0x.$IrvnzmZ2ol.5/4g4GhMVNbpsjvm115dbaUNP2rUq/7vE7MDdvwGPO2fM3gGAKlMnHmq3TQ3nU9/btU9IH5qRk0:16494:0:99999:7:::

/etc/group:israel:x:500:

[root@caguate ~]# groupadd -g 5001 usuarios

[root@caguate ~]# groupadd -g 5002 clientes

[root@caguate ~]# groupadd -g 5003 proveedores

[root@caguate ~]# groupadd -g 5004 directores

Page 14: Shell Es El Entorno Grafico Como Vamos a Ingresar

[root@caguate ~]# tail /etc/group

cristian:x:502:

Luis:x:503:

Rodrigo:x:504:

Jose:x:505:

rodrigo:x:506:

jose:x:507:

usuarios:x:5001:

clientes:x:5002:

proveedores:x:5003:

directores:x:5004:

[root@caguate ~]# adduser admin

[root@caguate ~]# tail /etc/group

Luis:x:503:

Rodrigo:x:504:

Jose:x:505:

rodrigo:x:506:

jose:x:507:

usuarios:x:5001:

clientes:x:5002:

proveedores:x:5003:

directores:x:5004:

admin:x:508:

[root@caguate ~]# ls -lt /home/

total 36

Page 15: Shell Es El Entorno Grafico Como Vamos a Ingresar

drwx------. 2 admin admin 4096 feb 28 10:54 admin

drwx------. 2 jose jose 4096 feb 28 10:43 jose

drwx------. 2 rodrigo rodrigo 4096 feb 28 10:41 rodrigo

drwx------. 2 Jose Jose 4096 feb 28 10:23 Jose

drwx------. 2 Rodrigo Rodrigo 4096 feb 28 10:23 Rodrigo

drwx------. 2 Luis Luis 4096 feb 28 10:23 Luis

drwx------. 2 cristian cristian 4096 feb 28 10:23 cristian

drwx------. 2 edwin edwin 4096 feb 28 10:23 edwin

drwx------. 2 israel israel 4096 feb 28 10:22 israel

[root@caguate ~]# rm -rf /home/borrar/

[root@caguate ~]# ls -lt /var/mail/

total 0

-rw-rw----. 1 509 mail 0 feb 28 10:56 borrar

-rw-rw----. 1 admin mail 0 feb 28 10:54 admin

-rw-rw----. 1 jose mail 0 feb 28 10:43 jose

-rw-rw----. 1 rodrigo mail 0 feb 28 10:41 rodrigo

-rw-rw----. 1 Jose mail 0 feb 28 10:23 Jose

-rw-rw----. 1 Rodrigo mail 0 feb 28 10:23 Rodrigo

-rw-rw----. 1 Luis mail 0 feb 28 10:23 Luis

-rw-rw----. 1 cristian mail 0 feb 28 10:23 cristian

-rw-rw----. 1 edwin mail 0 feb 28 10:23 edwin

-rw-rw----. 1 israel mail 0 feb 28 10:22 israel

[root@caguate ~]# rm -rf /var/mail/borrar

[root@caguate ~]# grep israel /etc/passwd etc/shadow /etc/group

/etc/passwd:israel:x:500:500:Israel Pacheco:/home/israel:/sbin/nologin

Page 16: Shell Es El Entorno Grafico Como Vamos a Ingresar

grep: etc/shadow: No existe el fichero o el directorio

/etc/group:israel:x:500:

[root@caguate ~]# grep israel /etc/passwd /etc/shadow /etc/group

/etc/passwd:israel:x:500:500:Israel Pacheco:/home/israel:/sbin/nologin

/etc/shadow:israel:$6$WYc4E0x.$IrvnzmZ2ol.5/4g4GhMVNbpsjvm115dbaUNP2rUq/7vE7MDdvwGPO2fM3gGAKlMnHmq3TQ3nU9/btU9IH5qRk0:16494:0:99999:7:::

/etc/group:israel:x:500:

[root@caguate ~]# ls -ld /home/israel /var/mail/israel

drwx------. 2 israel israel 4096 feb 28 10:22 /home/israel

-rw-rw----. 1 israel mail 0 feb 28 10:22 /var/mail/Israel

[root@caguate ~]# # asignar Grupos de Usuarios

[root@caguate ~]# adduser proveedor1

[root@caguate ~]# adduser proveedor2

[root@caguate ~]# adduser proveedor3

[root@caguate ~]# adduser cliente1

[root@caguate ~]# adduser cliente2

[root@caguate ~]# adduser cliente3

[root@caguate ~]# grep cliente1 /etc/passwd

cliente1:x:512:512::/home/cliente1:/bin/bash

[root@caguate ~]# ls /home/cliente1

[root@caguate ~]# usermod -G clientes clientes1

usermod: user 'clientes1' does not exist

[root@caguate ~]# usermod -G clientes cliente1

[root@caguate ~]# usermod -G clientes cliente2

[root@caguate ~]# usermod -G clientes cliente3

[root@caguate ~]# grep clientes /etc/group

Page 17: Shell Es El Entorno Grafico Como Vamos a Ingresar

clientes:x:5002:cliente1,cliente2,cliente3

[root@caguate ~]# usermod -G proveedores proveedor1

[root@caguate ~]# usermod -G proveedores proveedor2

[root@caguate ~]# usermod -G proveedores proveedor3

[root@caguate ~]# usermod -G usuarios israel

[root@caguate ~]# usermod -G usuarios edwin

[root@caguate ~]# usermod -G usuarios rodrigo

[root@caguate ~]# usermod -G usuarios cristian

[root@caguate ~]# usermod -G usuarios luis

usermod: user 'luis' does not exist

[root@caguate ~]# usermod -G usuarios jose

[root@caguate ~]# adduser luis

[root@caguate ~]# usermod -G usuarios luis

[root@caguate ~]# usermod -G usuarios jose

[root@caguate ~]# grep jose /etc/group

jose:x:507:

usuarios:x:5001:israel,edwin,rodrigo,cristian,jose,luis

[root@caguate ~]# usermod -G usuarios,proveedores,clientes,jose

usermod: user 'usuarios,proveedores,clientes,jose' does not exist

[root@caguate ~]# usermod -G usuarios,proveedores,clientes jose

[root@caguate ~]# grep jose /etc/group

jose:x:507:

usuarios:x:5001:israel,edwin,rodrigo,cristian,jose,luis

clientes:x:5002:cliente1,cliente2,cliente3,jose

proveedores:x:5003:proveedor1,proveedor2,proveedor3,jose

[root@caguate ~]# usermod -G usuarios,proveedores,clientes,directores jose

Page 18: Shell Es El Entorno Grafico Como Vamos a Ingresar

[root@caguate ~]#

[root@caguate ~]# cat /etc/group

root:x:0:

bin:x:1:bin,daemon

daemon:x:2:bin,daemon

sys:x:3:bin,adm

adm:x:4:adm,daemon

tty:x:5:

disk:x:6:

lp:x:7:daemon

mem:x:8:

kmem:x:9:

wheel:x:10:

mail:x:12:mail,postfix

uucp:x:14:

man:x:15:

games:x:20:

gopher:x:30:

video:x:39:

dip:x:40:

ftp:x:50:

lock:x:54:

audio:x:63:

nobody:x:99:

users:x:100:

Page 19: Shell Es El Entorno Grafico Como Vamos a Ingresar

floppy:x:19:

vcsa:x:69:

utmp:x:22:

utempter:x:35:

cdrom:x:11:

tape:x:33:

dialout:x:18:

saslauth:x:76:

postdrop:x:90:

postfix:x:89:

fuse:x:499:

sshd:x:74:

israel:x:500:

edwin:x:501:

cristian:x:502:

Luis:x:503:

Rodrigo:x:504:

Jose:x:505:

rodrigo:x:506:

jose:x:507:

usuarios:x:5001:israel,edwin,rodrigo,cristian,jose,luis

clientes:x:5002:cliente1,cliente2,cliente3,jose

proveedores:x:5003:proveedor1,proveedor2,proveedor3,jose

directores:x:5004:jose

admin:x:508:

proveedor1:x:509:

proveedor2:x:510:

Page 20: Shell Es El Entorno Grafico Como Vamos a Ingresar

proveedor3:x:511:

cliente1:x:512:

cliente2:x:513:

cliente3:x:514:

luis:x:515:

[root@caguate ~]#

[root@caguate ~]# # Crear de Directorios con permisos de grupos

[root@caguate ~]# mkdir -p /datos/publico /datos/clientes /datos/proveedores

[root@caguate ~]# ls

anaconda-ks.cfg documentos install.log install.log.syslog paquetes respaldos usuarios videos

[root@caguate ~]# ls -lt /

total 94

drwxr-xr-x. 5 root root 4096 feb 28 11:26 datos

drwxr-xr-x. 61 root root 4096 feb 28 11:13 etc

drwxr-xr-x. 18 root root 4096 feb 28 11:07 home

drwxrwxrwt. 3 root root 4096 feb 28 10:36 tmp

dr-xr-x---. 8 root root 4096 feb 28 09:40 root

drwxr-xr-x. 19 root root 3600 feb 28 08:33 dev

drwxr-xr-x. 7 root root 0 feb 28 08:32 selinux

drwxr-xr-x. 13 root root 0 feb 28 08:32 sys

dr-xr-xr-x. 83 root root 0 feb 28 08:32 proc

dr-xr-xr-x. 2 root root 12288 feb 21 11:54 sbin

dr-xr-xr-x. 9 root root 4096 feb 21 11:54 lib

dr-xr-xr-x. 5 root root 1024 feb 21 10:43 boot

dr-xr-xr-x. 2 root root 4096 feb 21 10:42 bin

drwxr-xr-x. 17 root root 4096 feb 21 10:41 var

Page 21: Shell Es El Entorno Grafico Como Vamos a Ingresar

drwxr-xr-x. 13 root root 4096 feb 21 10:41 usr

drwx------. 2 root root 16384 feb 21 10:41 lost+found

drwxr-xr-x. 2 root root 4096 sep 23 2011 media

drwxr-xr-x. 2 root root 4096 sep 23 2011 mnt

drwxr-xr-x. 2 root root 4096 sep 23 2011 opt

drwxr-xr-x. 2 root root 4096 sep 23 2011 srv

root@caguate ~]# ls -ld /datos/

drwxr-xr-x. 5 root root 4096 feb 28 11:26 /datos/

[root@caguate ~]# ls -ld /datos/*

drwxr-xr-x. 2 root root 4096 feb 28 11:26 /datos/clientes

drwxr-xr-x. 2 root root 4096 feb 28 11:26 /datos/proveedores

drwxr-xr-x. 2 root root 4096 feb 28 11:26 /datos/public

saber cuanta memoria y uso del cpu

[root@caguate ~]# more /proc/meminfo

[root@caguate ~]# more /proc/cpuinfo

drwxr-xr-x.

d directorio r lectura w escritura

Mas parámetros

[root@caguate ~]# ls -lt /dev/ | more

[root@caguate ~]# ls -lt /datos/

total 12

drwxr-xr-x. 2 root root 4096 feb 28 11:26 clientes

drwxr-xr-x. 2 root root 4096 feb 28 11:26 proveedores

Page 22: Shell Es El Entorno Grafico Como Vamos a Ingresar

drwxr-xr-x. 2 root root 4096 feb 28 11:26 publico

[root@caguate ~]# chown -R admin /datos/clientes/

[root@caguate ~]# chown -R admin.clientes /datos/clientes/

[root@caguate ~]# chown -R admin.clientes /datos/proveedores/

[root@caguate ~]# chown -R admin.proveedores /datos/proveedores/

[root@caguate ~]# chown -R admin.usuarios /datos/publico/

[root@caguate ~]# ls -lt

total 40

drwxr-xr-x. 3 root root 4096 feb 28 09:46 respaldos

drwxr-xr-x. 2 root root 4096 feb 28 09:39 videos

drwxr-xr-x. 2 root root 4096 feb 28 09:38 documentos

drwxr-xr-x. 2 root root 4096 feb 28 09:38 usuarios

drwxr-xr-x. 2 root root 4096 feb 28 09:38 paquetes

-rw-------. 1 root root 1375 feb 21 10:44 anaconda-ks.cfg

-rw-r--r--. 1 root root 8823 feb 21 10:44 install.log

-rw-r--r--. 1 root root 3384 feb 21 10:43 install.log.syslog

[root@caguate ~]# ls -lt /datos

total 12

drwxr-xr-x. 2 admin clientes 4096 feb 28 11:26 clientes

drwxr-xr-x. 2 admin proveedores 4096 feb 28 11:26 proveedores

drwxr-xr-x. 2 admin usuarios 4096 feb 28 11:26 publico

[root@caguate ~]# r (read) 4, w (write) 2, x, (execute) 1

-bash: error sintáctico cerca del elemento inesperado `read'

[root@caguate ~]# # r 4, w 2, x 1,rwx 4+2+1

[root@caguate ~]# # r-x 4+0+1

[root@caguate ~]# # r-- 4+0+0

[root@caguate ~]# #rwx = 7 , r-x = 5, --x = 1, --- = 0

Page 23: Shell Es El Entorno Grafico Como Vamos a Ingresar

[root@caguate ~]# chmod -R 0770 /datos/clientes/

[root@caguate ~]# chmod -R 0770 /datos/proveedores/

[root@caguate ~]# chmod -R 0775 /datos/publico/

[root@caguate ~]# ls -lt /datos/

total 12

drwxrwx---. 2 admin clientes 4096 feb 28 11:26 clientes

drwxrwx---. 2 admin proveedores 4096 feb 28 11:26 proveedores

drwxrwxr-x. 2 admin usuarios 4096 feb 28 11:26 publico