13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

20.3 Be an Enabler, or “Let’s Be Codependent!”447Imagine that user names bob, ted, carol, and alice are part ofcarl and michael’s Web development team and each has an account <strong>on</strong>the box <strong>on</strong> which we intend to install JBoss.So, we create a group entry in the /etc/group file:local:x:100:carl,michael,bob,carol,ted,aliceIf Bob later leaves to join the custodial staff, simply remove his namefrom the group and he loses his access.TIPThe user’s default group is specified in the /etc/passwd file. Here’s a sample:mschwarz:x:500:500:Michael Schwarz:/home/mschwarz:/bin/bashThe fields of this are:username:passwd:uid:gid:userinfo:homedir:loginprogwhere:• username is the login name of the user.• passwd is the user’s encrypted password. Or rather it used to be. Now,this is usually x and the encrypted password is stored in the/etc/shadow file. This is because /etc/passwd must be worldreadable.The shadow file is not. This prevents some<strong>on</strong>e reading theencrypted passwords to do an offline dicti<strong>on</strong>ary attack.• uid is the numeric user ID associated with this username.• gid is the numeric group ID of this user’s default group. Look for thisnumber in /etc/group to find the name of the default group.• userinfo is additi<strong>on</strong>al informati<strong>on</strong> about this user. Sometimes called thegecos field for obscure historical reas<strong>on</strong>s, 5 this field usually stores theuser’s real name and possibly other informati<strong>on</strong> like office locati<strong>on</strong> andph<strong>on</strong>e number.• homedir is the user’s home directory.• loginprog is the name of the program that will be executed when theuser logs in. This is usually a shell, but it may be any program.5. See http://www.hyperdicti<strong>on</strong>ary.com/dicti<strong>on</strong>ary/GCOS if you are dying toknow why.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!