3 Pages

usersgroups

Course: CIT 370, Fall 2009
School: W. Kentucky
Rating:
 
 
 
 
 

Word Count: 1824

Document Preview

Administration System Users, Groups and Permissions In Linux, each user has his/her own account name. Accompanying each user account is a record that describes the user: User ID# User password (encrypted) User groups (see below) User home directory (if there is one) User login shell Password expiration information (if any) Comments (usually stores the user's full name) Other fields are available as needed...

Register Now

Unformatted Document Excerpt

Coursehero >> Kentucky >> W. Kentucky >> CIT 370

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Administration System Users, Groups and Permissions In Linux, each user has his/her own account name. Accompanying each user account is a record that describes the user: User ID# User password (encrypted) User groups (see below) User home directory (if there is one) User login shell Password expiration information (if any) Comments (usually stores the user's full name) Other fields are available as needed but are not very commonly used. Groups are available so that users can set permissions on files so that other people in the same group(s) can have common access. A private group is usually created whenever a user account is created. This inserts the user into a group that just contains themselves. When you do an ls l, you will see a file's owner (user name) and group (group name of the owner). You can also insert multiple users into other defined groups (this will be discussed later). To create a user, you may use the command line instruction useradd, or you may use the graphical user/group manager tool. To create a group, you may use the command line instruction groupadd, or you may use the graphical user/group manager tool. You may modify and delete users and groups using either the graphical user/group manager tool or by using usermod, groupmod, userdel, and groupdel. The graphical tool (shown below) is pretty straightforward to use. The command line instructions take a little practice. As you can see, you can switch between managing users and groups by clicking on either tab. You can add a user or group by clicking on the appropriate button. To delete a user or group, you must first click on that user or group in the listing. To modify a user or group, select the user or group and the click on Properties. The useradd instruction is simple to use if you do not want to use anything but the default values. The instruction is as simple as useradd name. The command does allow a number of parameters: useradd [-u uid [-o]] [-g group] [-G group, ...] [-d home] [-s shell] username. Using u, you can set the new user's ID number. If you do not specify this, Linux will use the next available UID. d allows you to specify the user's home directory. If you do not specify this, Linux will use /home/username. Using s you can specify the user's default shell. If you do not specify this, it will default to /bin/bash. Finally, -p allows you to specify an initial password. If you do not specify one, there is no initial password and the user can log in by simply hitting the enter key when asked for a password. This is a security problem and should never be done. Alternatively, once the account is created, you can use passwd to set the user's initial password. The name that comes at the end of useradd is the user's log in name. Using the c comment, you can specify the user's full name by placing it (or other comments) in " ". Using G, you can specify multiple groups that this new user will belong to. User account information is placed in the file /etc/passwd. The information in this file includes for each user, their user ID, user name, home directory, default shell, and comment (which usually is their full name). Interestingly, missing from this file is the user's password. In the past, this file included all user passwords, stored in an encrypted format. But because this file is readable by anyone, it allowed people to try to crack passwords because, while encrypted, it gave an indication of the password's length. Now, passwords are stored in the file /etc/shadow, which is only readable by root. Group information is stored in /etc/group. Each group is listed along with its group ID and the users who have been placed into that group. Groups are an important feature in Linux because it provides flexibility in defining access rights. Aside from the private group, a user can be added to any number of other groups. Permissions are associated with every file and directory in the Linux file space. Permissions break up into three categories for three sets of people. The three categories are read, write and execute and the three sets of people are the file's owner, the file's group, and others (everyone else). The three categories are fairly self explanatory for files. Note to modify a file, you must have write access otherwise you will have to copy the file and modify the copy instead. Some files may not require execute access because they are not executed (including files that are interpreted, for instance in a web browser). Shell scripts are like executable programs though and require execute privilege to be executed in your shell. Directories require execute access to be able to cd into them only read access to see what is in them. When you use ls l, you will see a file's owner and group. If you are in the group as listed in ls l, then you have that group's permissions. Remember that you may be in several different groups so you can have access to different files that are owned by different groups. The permissions are listed using this notation: filetype owner:read/write/execute group:read/write/execute other:read/write/execute. A typical file may look like this -rwxr-xr-meaning that the is file of type - (standard file), the owner has rwx (read, write and execute) permission, the group has read and execute permission and everyone else has read only permission. Another example might be drwxr----- which says that this directory has rwx for the owner and read only for the group. People in the same group can read the contents of the directory, but cannot cd to it nor copy or access any files from that directory. As the owner of a file, you can chance the file's owner or group (as long as you are the new owner, or belong to the new group) using chown and chgrp respectively, and you can change the file's permissions using chmod. The chmod instruction works like this: chmod newpermissions filename where newpermissions is one of the following: A 3-digit number that describes rwx permission for each of owner, group and world. A read permission is equal to 4, a write permission is equal to 2, and an execute permission is equal to 1. So to assign read and execute, it would be 4+1 = 5. If you want to set the permission of a file, foo, to be read/write/execute for the owner, read/write for the group, and read-only for everyone else, you would use chmod 764 foo. If you wanted to make the file read/execute for yourself and the group, and inaccessible to the rest of the world, you would use chmod 550 foo. The chmod operation also allows you to change permissions for just owner (u), group (g) or world (o) by using u=rwx,g=rx,o=r or by using + to add a permission or to remove a permission. If the file currently is set as 764 and you want to remove write permission from the group, you would use chmod g-w foo. If you wanted to change the file to add execute to the group and remove read from the world, you would use chmod g+x,o-r foo. You can combine u, g, o terms and =, +, - terms as you like. When you create a new account, it automatically does several things. First, it adds the new user's information to /etc/passwd and the initial password to /etc/shadow. It also creates a home directory (unless you specify that you do not want the user to have one) and populates the directory with any files that are in the directory /etc/skel. As a system administrator, you can place certain files in /etc/skel that you want everyone to have (such as your .bashrc or a .profile or .login script). In Ubuntu, this directory has default files of .bashrc, .bash_logout and .bash_profile. Other items that you might choose to place in /etc/skel could be template documents that all users might use, environment variables to access resources such as printers, and additional scripts for other shells or for other start-up routines. Configuration files /etc/login.defs and /etc/default/useradd are used by all users. Note that /etc/skel is set up already for you, but you should tailor it based on the needs of your particular organization. As a system administrator, some important instructions to know are su, passwd, chage. su switch user. As root, you can switch to any user without needing to know their password. Once you have switched, you have that user's full access rights. If y...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

W. Kentucky - CIT - 370
System Administration Server InstallationAnother task of the system administrator is to install and maintain servers. Perhaps the most common server you might be asked to maintain is a web server. Apache is the typical web server for Linux/Unix comp
W. Kentucky - CIT - 370
System Administration Course Notes ProcessesThe term process, when discussion operating systems, is used to describe a program in the state of execution. That is, it is a program that has begun execution but has not completed. The reason that we dif
W. Kentucky - CIT - 370
SYLLABUS FALL SEMESTER 2008CIT 370-002 System AdministrationINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/cit370f2008.htmlOFFICE HOURS: MWF 10:00 A.M. 10:5
W. Kentucky - CIT - 370
System Administration Booting, Initialization, and ServicesHere, we examine the boot process, initializing the operating system through shell scripts, and services started and how to start and stop services. We also discuss some of the more common s
W. Kentucky - CIT - 370
SYLLABUS SPRING SEMESTER 2005CIT 370-001 Operating Systems TechnologyINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: OFFICE HOURS: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/370sp2005.html TR 10:45 A.M.
W. Kentucky - CIT - 380
SYLLABUS FALL SEMESTER 2008 CIT 380-001 Securing Computer SystemsINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/cit380Fall2008.htmlOFFICE HOURS: MWF 10:00 A.M.
W. Kentucky - CIT - 140
SYLLABUS SPRINGSEMESTER2008CIT140002 IntroductiontoComputerInformationTechnologyINSTRUCTOR: OFFICE: PHONE: EMAIL: WEBPAGE: OFFICEHOURS: Dr.CharlesE.Frank ST311 (859)5725320(office) frank@nku.edu http:/www.nku.edu/~frank/cit140sp2008.html TR 12:30P
W. Kentucky - CIT - 141
SYLLABUS SPRING SEMESTER 2009CIT 141-002 PC/Networking FundamentalsINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/cit141sp2009.htmlOFFICE HOURS:W 10:00 A.M
W. Kentucky - CIT - 520
SYLLABUS SPRING SEMESTER 2007CIT 520-001 Managing Computer SystemsINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: OFFICE HOURS: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/520sp2007.html MWF 10:00 A.M. 1
W. Kentucky - CIT - 520
SYLLABUS FALLSEMESTER2007CIT520001ManagingComputerSystemsINSTRUCTOR: OFFICE: PHONE: EMAIL: WEBPAGE: OFFICEHOURS: Dr.CharlesE.Frank ST311 (859)5725320(office) frank@nku.edu http:/www.nku.edu/~frank/cit520f2007.html TR 11:00A.M. 12:00P.M. T 4:00P.M
W. Kentucky - CSC - 382
Name _ Assignment 14 Netsky Worm CSC 382/582Fall 2006 Use an Internet search engine to find information about the Netsky worm. Write a couple of paragraphs about this worm. How does it attack? What damage does it do? How many variation of Netsky ar
W. Kentucky - CIT - 140
SYLLABUS FALLSEMESTER2007CIT140002 IntroductiontoComputerInformationTechnologyINSTRUCTOR: OFFICE: PHONE: EMAIL: WEBPAGE: OFFICEHOURS: Dr.CharlesE.Frank ST311 (859)5725320(office) frank@nku.edu http:/www.nku.edu/~frank/cit140f2007.html TR 11:00A.M.
W. Kentucky - CIT - 380
Shoplifting is an ongoing problem for retail stores. Assume you are a manager of a clothing store. 1) Describe three measures you would take to prevent or detect shoplifting. 2) What are the costs of your security measures both to you and to your cus
W. Kentucky - CIT - 370
SYLLABUS FALL SEMESTER 2006 CIT 370-001 Operating Systems TechnologyINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: OFFICE HOURS: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/370f2006.html MWF 10:00 A.M. 10
W. Kentucky - CIT - 370
SYLLABUS FALL SEMESTER 2005CIT 370-001 Operating Systems TechnologyINSTRUCTOR: OFFICE: PHONE: EMAIL: WEB PAGE: OFFICE HOURS: Dr. Charles E. Frank ST 311 (859) 572-5320 (office) frank@nku.edu http:/www.nku.edu/~frank/370f2005.html MW 5:00 P.M. 6:0
W. Kentucky - CIT - 370
Page 214 #!/usr/bin/perl -w # whereis.pl use strict; my $prog = shift @ARGV; die "usage: perl whereis.pl <file>" unless defined $prog; my $found = 0; foreach my $dir (split /:/, $ENV{PATH}) { if (-x "$dir/$prog") { print "$dir/$prog\n"; $found = 1; l
W. Kentucky - CIT - 370
Name _ Laboratory 8 CIT 370-001 Fall 2006Create a new user account. Log in as root. Applications | Software Settings | Users and Groups Follow the steps on pages 726-7. See also Figures 29-2 and 29-3. Open a Terminal Window. #cat /etc/passwd My acco
W. Kentucky - CIT - 370
OperatingSystemsTechnology CourseNotes BasicLinuxCommandsManyofthebasicLinuxcommandsdealwithnavigatingtheLinuxfilespaceandhandlingfiles anddirectoriesinthefilespace. File a unit of storage that might contain data for a program to access, or it migh
W. Kentucky - READINGTHE - 2006
Northern Kentucky UniversityCollege of Education & Human ServicesSelected Topics in EducationReading the Licking River EDG 693-071 Summer 2006"Providing for the educational needs of all students" The teacher as reflective decision maker is the
W. Kentucky - INF - 286
WebDevelopment&Design FoundationswithXHTMLChapter3 KeyConceptsInthischapter,youwilllearnto: Learning OutcomesDescribetheevolutionofstylesheets fromprintmediatotheWeb ListadvantagesofusingCascadingStyleSheets UsecoloronWebpages Creat
W. Kentucky - CSC - 262
CSC 262.002 Programming Assignment #6 Queues and SimulationDue Date: Tuesday, March 19In this assignment, you are to create a Queue to be used in a bank simulation. The simulation will determine how many tellers the bank should have available dur
W. Kentucky - AWARDS - 2009
CALL FOR NOMINATIONS PART-TIME FACULTY EXCELLENCE IN INSTRUCTION AWARD PURPOSE:To recognize and reward excellence in classroom instruction and contributions to the learning environment by part-time faculty members.ELIGIBILITY:Nominees must: Have
W. Kentucky - CH - 18
"Biomira","TSE Index"-.11627906976744186,-.023314364545611328.059210526315789616,.04166091499252457.12422360248447203,.027903618738742718-.0055248618784531165,.05496693946224383-.12222222222222218,.06944871498686156-.1582278481012658,-.01512393
W. Kentucky - CH - 212
"Biomira","TSE Index"-.11627906976744186,-.023314364545611328.059210526315789616,.04166091499252457.12422360248447203,.027903618738742718-.0055248618784531165,.05496693946224383-.12222222222222218,.06944871498686156-.1582278481012658,-.01512393
Columbia - JM - 3058
SOLITON SPLITTING BY EXTERNAL DELTA POTENTIALSJUSTIN HOLMER, JEREMY MARZUOLA, AND MACIEJ ZWORSKI Abstract. We show that a soliton scattered by an external delta potential splits into two solitons and a radiation term. Theoretical analysis gives the
W. Kentucky - WATERSM - 1
Math 141Learning ObjectivesMusser, Burger, and PetersonChapter 12 Geometric Shapes Section 12.1 Students will be able to: Give analytical descriptions of various types of triangles, quadrilaterals and other polygons and their parts. List seve
W. Kentucky - ISSUE - 1
FryInvestigating the link between the dinoflagellate Amyloodinium sp.? and marine head and lateral line erosion (MHLLE) on Zebrasoma scopas (brown sailfin tangs)Michelle Ann FryFaculty Mentors: Denice Robertson, PhD (CINSAM/Department of Biologic
W. Kentucky - MAT - 225
Click to download data.Adjacency MatricesText Reference: Section 2.1, p. 114The purpose of this set of exercises is to show how powers of a matrix may be used to investigate graphs. Special attention is paid to airline route maps as examples of
W. Kentucky - MAT - 225
You can also view this case study in the following formats:MathematicaMapleMATLABHP 48GDiet ProblemsText Reference: Section 1.10, p. 93 The purpose of this set of exercises is to provide examples of vector equations which result from balan
W. Kentucky - MAT - 225
W. Kentucky - MAT - 360