Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-16-2010, 11:38 PM   #1
LQ Newbie
Registered: Dec 2009
Posts: 9

Rep: Reputation: 0
Assigning a user a non-interactive login

I am trying to assign a user account on RHEL5 Server a non-interactive login but I am not sure if this is the correct command:

useradd useraccount -s /sbin/nologin

After I issue this command, I try to log in with this account and it says the "Administrator has disabled this account" when I enter the password. Does any one know if the command above is correct? I apologize for being vague since I am a noob to RHEL server. Thank you.
Old 04-17-2010, 01:15 AM   #2
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
The syntax is correct. The /sbin/nologin is a replacement of the older /bin/false. Some admins use them both.

There really is no difference between them as they both do the same task of denying user access and assigning a non interactive shell.

The login shell will always ask for a password. This is normal.

Last edited by dv502; 04-17-2010 at 01:20 AM.
Old 04-17-2010, 01:17 AM   #3
Registered: Mar 2010
Location: Tennessee, USA
Distribution: Arch, Fedora
Posts: 59

Rep: Reputation: 18
What exactly are you trying to do? The user's "shell" should now be the nologin command which should, according to the man page, "politely refuse a login". It seems to be doing that quite well. What was the expected result?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 you turn off login banner for non-interactive ssh? cpatter12 Linux - Security 21 12-14-2016 03:35 PM
User identification number assigning linuxjamil Fedora 2 10-23-2008 05:15 AM
Problem assigning new user to my group Odyssey1942 Linux - Newbie 30 08-24-2006 03:39 PM
Interactive ppp login hotrodowner Linux - Networking 0 07-06-2004 11:11 PM
MySql + Non interactive Login ! xanthium Programming 2 03-30-2002 01:20 AM

All times are GMT -5. The time now is 04:42 AM.

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