ÈëÃÅLinuxϵͳ£º²éÕÒÄ¿½ñÓû§Éí·Ý
LinuxϵͳÈëÃÅÖ¸ÄÏ£ºÅÌÎÊÄ¿½ñÓû§Éí·Ý£¬ÐèÒªÏêϸ´úÂëʾÀý
ÔÚLinuxϵͳÖУ¬ÏàʶĿ½ñÓû§µÄÉí·ÝÊǺÜÊÇÖ÷ÒªµÄ£¬Ëü¿ÉÒÔ×ÊÖúÎÒÃÇÈ·ÈÏÎÒÃÇËùÓµÓеÄȨÏÞÒÔ¼°¿ÉÒÔÖ´ÐеIJÙ×÷¹æÄ£¡£±¾ÎĽ«Ïò¸÷ÈËÏÈÈÝÔõÑùʹÓÃһЩ¼òÆÓµÄÏÂÁîÀ´ÅÌÎÊÄ¿½ñÓû§µÄÉí·Ý£¬ÔÚÖÕ¶ËÖÐÊäÈëÒÔÏ´úÂëʾÀýÀ´»ñÈ¡²Ù×÷Ч¹û¡£
µÚÒ»²½£ºÉó²éÄ¿½ñÓû§µÄÓû§Ãû
ÒªÅÌÎÊÄ¿½ñÓû§µÄÓû§Ãû£¬¿ÉÒÔʹÓÃÒ»ÏÂÏÂÁ
whoami
µÇ¼ºó¸´ÖÆ
Ö´ÐÐÒÔÉÏÏÂÁîºó£¬Öն˻᷵»ØÄ¿½ñÓû§µÄÓû§Ãû£¬ÈçÏÂËùʾ£º
john
µÇ¼ºó¸´ÖÆ
µÚ¶þ²½£ºÉó²éÄ¿½ñÓû§ËùÊôµÄÓû§×é
ÒªÅÌÎÊÄ¿½ñÓû§ËùÊôµÄÓû§×飬¿ÉÒÔʹÓÃÒ»ÏÂÏÂÁ
groups
µÇ¼ºó¸´ÖÆ
Ö´ÐÐÒÔÉÏÏÂÁîºó£¬Öն˻᷵»ØÄ¿½ñÓû§ËùÊôµÄÓû§×飬ÈçÏÂËùʾ£º
john adm cdrom sudo dip plugdev lpadmin sambashare
µÇ¼ºó¸´ÖÆ
µÚÈý²½£ºÉó²éÄ¿½ñÓû§µÄUIDºÍGID
ÒªÅÌÎÊÄ¿½ñÓû§µÄUID£¨Óû§±êʶ·û£©ºÍGID£¨×é±êʶ·û£©£¬¿ÉÒÔʹÓÃÒ»ÏÂÏÂÁ
id
µÇ¼ºó¸´ÖÆ
Ö´ÐÐÒÔÉÏÏÂÁîºó£¬Öն˻᷵»ØÄ¿½ñÓû§µÄUIDºÍGID£¬ÈçÏÂËùʾ£º
uid=1000(john) gid=1000(john) groups=1000(john),4(adm),?24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambash?are)
µÇ¼ºó¸´ÖÆ
ͨ¹ýÒÔÉϼòÆÓµÄÏÂÁîʾÀý£¬ÎÒÃÇ¿ÉÒÔÇáËɵØÅÌÎʵ½Ä¿½ñÓû§µÄÉí·ÝÐÅÏ¢£¬°üÀ¨Óû§Ãû¡¢ËùÊôÓû§×é¡¢UIDºÍGIDµÈÐÅÏ¢¡£ÕâЩÐÅÏ¢¹ØÓÚÎÒÃÇÔÚLinuxϵͳÖÐÖ´ÐвÙ×÷ºÍÖÎÀíÎļþȨÏÞºÜÊÇÓÐ×ÊÖú¡£Ï£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú£¬ÈÃÄú¸ü¿ìµØÊìϤLinuxϵͳµÄ»ù±¾²Ù×÷¡£
ÒÔÉϾÍÊÇÈëÃÅLinuxϵͳ£º²éÕÒÄ¿½ñÓû§Éí·ÝµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡