Administration
  Home arrow Administration arrow Page 4 - Managing Users, Part 2
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ADMINISTRATION

Managing Users, Part 2
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 15
    2004-06-29


    Table of Contents:
  • Managing Users, Part 2
  • Options userdel, usermod, groupadd, groupdel
  • GUI User Managers
  • Critical Skill

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Managing Users, Part 2 - Critical Skill
    ( Page 4 of 4 )

    Normally, when a program is run by a user, it inherits all of the rights (or lack thereof) that the user has. If the user can’t read the /var/log/messages file, neither can the program. Note that this permission can be different than the permissions of the user who owns the program file (usually called the binary). For example, the ls program (which is used to generate directory listings) is owned by the root user. Its permissions are set so that all users of the system can run the program. Thus, if the user sshah runs ls, that instance of ls is bound by the permissions granted to the user sshah, not root.

    However, there is an exception. Programs can be tagged with what’s called a SetUID bit, which allows a program to be run with permissions from the program’s owner, not the user who is running it. Using ls as an example again, setting the SetUID bit on it and having the file owned by root means that if the user sshah runs ls, that instance of ls will run with root permissions, not with sshah’s permissions. The SetGID bit works the same way, except instead of applying the file’s owner, it is applied to the file’s group setting.

    To enable the SetUID bit or the SetGID bit, you need to use the chmod command, which is covered in detail in Module 6. To make a program SetUID, prefix whatever permission value you are about to assign it with a 4. To make a program SetGID, prefix whatever permission you are about to assign it with a 2. For example, to make the /bin/ls a SetUID program (which is a bad idea, by the way), you would use this command:

    [root@ford /root]# chmod 4755 /bin/ls

    Module 5 Mastery Check List (for parts 1 and 2):

    1. What information is stored in the /etc/passwd file?
    2. What information is stored in the /etc/shadow file?
    3. Does Linux use the username or the UID when performing operations pertaining to that user (such as file permissions)?
    4. Why can SetUID programs be a bad thing?
    5. What is the format of a user entry in the /etc/passwd file?
    6. What is the GECOS entry?
    7. How do you disable a user so they cannot access the system?
    8. What information is stored in the /etc/group file?
    9. What is the format of an entry in the /etc/group file?
    10. What happens if you forget to add the home directory for a user?
    11. Where is the list of available shells listed?
    12. What are startup scripts?

    This chapter is from Linux Administration, A Beginner's Guide, third edition, by Graham and Shah. (McGraw-Hill/Osborne, 2002, ISBN: 0072225629). Check it out at your favorite bookstore today.

    Buy this book now.



     
     
    >>> More Administration Articles          >>> More By McGraw-Hill/Osborne
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek