Sie sind auf Seite 1von 16

[admin@localhost~]$suroot Password:

ADVANCED EXPERIMENT 2

[root@localhostadmin]#useraddjohn

[root@localhostadmin]#passwdjohn Changingpasswordforuserjohn. Newpassword: BADPASSWORD:itistoosimplistic/systematic BADPASSWORD:istoosimple Retypenewpassword: passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#useraddalex

[root@localhostadmin]#passwdalex Changingpasswordforuseralex. Newpassword:

BADPASSWORD:itisWAYtooshort BADPASSWORD:isapalindrome Retypenewpassword: passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#useradddave

[root@localhostadmin]#useraddbob

[root@localhostadmin]#useraddzak

[root@localhostadmin]#useraddeddy

[root@localhostadmin]#useraddmanager

[root@localhostadmin]#passwddave Changingpasswordforuserdave. Newpassword: BADPASSWORD:itisWAYtooshort BADPASSWORD:isapalindrome

Retypenewpassword: passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#passwdbob Changingpasswordforuserbob. Newpassword: BADPASSWORD:itisWAYtooshort BADPASSWORD:isapalindrome Retypenewpassword: passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#passwdzak Changingpasswordforuserzak. Newpassword: BADPASSWORD:itisWAYtooshort BADPASSWORD:isapalindrome Retypenewpassword:

passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#passwdeddy Changingpasswordforusereddy. Newpassword: BADPASSWORD:itisWAYtooshort BADPASSWORD:isapalindrome Retypenewpassword: passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#passwdmanager Changingpasswordforusermanager. Newpassword: BADPASSWORD:itisWAYtooshort BADPASSWORD:isapalindrome Retypenewpassword: passwd:allauthenticationtokensupdatedsuccessfully.

[root@localhostadmin]#mangroupadd

[root@localhostadmin]#groupaddgSales10000 groupadd:invalidgroupID'Sales'

[root@localhostadmin]#groupaddg10000Sales

[root@localhostadmin]#groupaddg10001hr

[root@localhostadmin]#groupaddg10002web

[root@localhostadmin]#manusermod

[root@localhostadmin]#usermodG10000John usermod:user'John'doesnotexist

[root@localhostadmin]#usermodG10000john

[root@localhostadmin]#usermodG10000alex

[root@localhostadmin]#usermodG10001{dave,bob}

Usage:usermod[options]LOGIN

[root@localhostadmin]#usermodG10001dave

[root@localhostadmin]#usermodG10001bob

[root@localhostadmin]#usermodG10002zak

[root@localhostadmin]#usermodG10002eddy

[root@localhostadmin]#usermodG10000,10001,10002manager

[root@localhostadmin]#sujohn

[john@localhostadmin]$pwd /home/admin

[john@localhostadmin]$id uid=501(john)gid=501(john)groups=501(john),10000(Sales) context=unconfined_u:unconfined_r:unconfined_t:s0s0:c0.c1023

[john@localhostadmin]$manid

[john@localhostadmin]$idg 501

[john@localhostadmin]$idr id:cannotprintonlynamesorrealIDsindefaultformat

[john@localhostadmin]$manid

[john@localhostadmin]$idugGr id:cannotprint"only"ofmorethanonechoice

[john@localhostadmin]$idugG id:cannotprint"only"ofmorethanonechoice

[john@localhostadmin]$idurG id:cannotprint"only"ofmorethanonechoice

[john@localhostadmin]$idrg

501

[john@localhostadmin]$idur 501

[john@localhostadmin]$idgr 501

[john@localhostadmin]$idGr 50110000

[john@localhostadmin]$manid

[john@localhostadmin]$idGralex 50210000 [john@localhostadmin]$idGrdave 50310001

[john@localhostadmin]$idGrbob 50410001

[john@localhostadmin]$idGrzak 50510002

[john@localhostadmin]$idGreddy 50610002

[john@localhostadmin]$idGrmanager 507100001000110002

[john@localhostadmin]$suadmin Password:

[admin@localhost~]$ls DesktopDocumentsDownloadsMusicPicturesPublicTemplatesuser Videos

[admin@localhost~]$cduser

[admin@localhostuser]$ls

projects

[admin@localhostuser]$cd.. bash:cd..:commandnotfound...

[admin@localhostuser]$cd..

[admin@localhost~]$pwd /home/admin

[admin@localhost~]$cd..

[admin@localhosthome]$pwd /home

[admin@localhosthome]$mkdir../depts mkdir:cannotcreatedirectory`../depts':Permissiondenied

[admin@localhosthome]$mkdirdepts mkdir:cannotcreatedirectory`depts':Permissiondenied

[admin@localhosthome]$cdadmin

[admin@localhost~]$mkdirdepts

[admin@localhost~]$mkdir./depts/sales

[admin@localhost~]$manmkdir

[admin@localhost~]$mkdirp/depts/{hr,web} mkdir:cannotcreatedirectory`/depts':Permissiondenied mkdir:cannotcreatedirectory`/depts':Permissiondenied

[admin@localhost~]$mkdirp./depts/{hr,web}

[admin@localhost~]$ls deptsDocumentsMusicPublicuser DesktopDownloadsPicturesTemplatesVideos

[admin@localhost~]$cddepts

[admin@localhostdepts]$ls hrsalesweb

[admin@localhostdepts]$manmkdir

[admin@localhostdepts]$

[admin@localhostdepts]$manchgrp [admin@localhostdepts]$chgrpsales./sales chgrp:invalidgroup:`sales'

[admin@localhostdepts]$chgrpsales/depts./sales chgrp:invalidgroup:`sales'

[admin@localhostdepts]$chgrpsales../depts./sales chgrp:invalidgroup:`sales'

[admin@localhostdepts]$chgrphr../depts./hr chgrp:cannotaccess`../depts./hr':Nosuchfileordirectory

[admin@localhostdepts]$chgrphr../depts/hr chgrp:changinggroupof`../depts/hr':Operationnotpermitted

[admin@localhostdepts]$chgrphr../depts/sales chgrp:changinggroupof`../depts/sales':Operationnotpermitted

[admin@localhostdepts]$suroot Password:

[root@localhostdepts]#pwd /home/admin/depts

[root@localhostdepts]#ls hrsalesweb

[root@localhostdepts]#chgrpsales../depts/sales chgrp:invalidgroup:`sales'

[root@localhostdepts]#chgrphr../depts/hr

[root@localhostdepts]#chgrpweb../depts/web

[root@localhostdepts]#chgrpsales../depts/sales chgrp:invalidgroup:`sales'

[root@localhostdepts]#chgrpsale../depts/sales chgrp:invalidgroup:`sale'

[root@localhostdepts]#chgrpsale../depts./sales chgrp:invalidgroup:`sale'

[root@localhostdepts]#chmod755../depts

[root@localhostdepts]#chmod770../depts/{hr,sales,web}

[root@localhostdepts]#lsa ...hrsalesweb

[root@localhostdepts]#lsal total20

drwxrxrx.5adminadmin4096Aug2619:37. drwx.29adminadmin4096Aug2619:47.. drwxrwx.2adminhr4096Aug2619:37hr drwxrwx.2adminadmin4096Aug2619:36sales drwxrwx.2adminweb4096Aug2619:37web [root@localhostdepts]#suadmin [admin@localhostdepts]$chgrpsales../depts/sales chgrp:invalidgroup:`sales'

[admin@localhostdepts]$chgrphr../depts/sales

chgrp:changinggroupof`../depts/sales':Operationnotpermitted [admin@localhostdepts]$suroot Password:

[root@localhostdepts]#chgrphr../depts/sales

[root@localhostdepts]#lsal total20

drwxrxrx.5adminadmin4096Aug2619:37. drwx.29adminadmin4096Aug2619:51.. drwxrwx.2adminhr4096Aug2619:37hr drwxrwx.2adminhr4096Aug2619:36sales drwxrwx.2adminweb4096Aug2619:37web

[root@localhostdepts]#chgrpsales../depts/sales chgrp:invalidgroup:`sales'

[root@localhostdepts]#chgrpSales../depts/sales

[root@localhostdepts]#