LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-23-2009, 09:30 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
Setting up a service account in RHEL 5


Hello.


I need to create a service account on RHEL 5, and could use some advice one how to proceed. What I'd like to do is this:
1) it will not be possible to log in as the user
2) the user will have a home directory so that it has its own .bashrc file

I guess I can set the user up with a random password and never distribute the password, so that one can't log into that account. Is this the best option, or is there other ways of doing this? Alternatively, I can use the nologin shell.

Furthermore, in RHEL 5 "man useradd" says that there's a "-r" (if I remember correctly) option that can be used for creating service accounts. This option combined with "-m" option may give me what I need, but I can't seem to find documentation of what the "-r" option actually does. Does anyone know this?

Regards,
kenneho
 
Old 06-23-2009, 09:54 AM   #2
jhannah
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Rep: Reputation: 0
useradd -r -m should do what you need. All it really does is select the UID from the lower range reserved for service accounts and will ensure the password doesn't expire. If you simply don't set a password on the account, no one will be able to login as that user. You can, however, still make use of it through sudo/su provided it has a valid shell.

Jon Hannah
Sr. Network Engineer
jhannah@hostmysite.com
HostMySite.com

Last edited by jhannah; 06-24-2009 at 09:11 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I start the web service on RHEL 5? JeffS-at-Areva Linux - Newbie 1 05-20-2008 12:43 PM
Using RHEL 64bit Not sure how to unlock an account mccartjd Linux - Newbie 2 04-24-2008 06:26 AM
Disable RPC nlockmgr service on RHEL AS 4 - How? tieuphongvan Linux - Networking 4 04-18-2008 01:50 AM
how to install an internet service provider with account managment linux juggler Linux - Server 0 12-10-2006 12:42 PM
lock root account after 3 login attempts - RHEL AS 3 jrparker2005 Red Hat 1 05-17-2005 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration