LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-08-2014, 01:24 PM   #1
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 139

Rep: Reputation: 16
User Login


hello,

is it possible to set-

when ever i create a user by "useradd" command it set the user as /bin/false or /bin/nologin shell.

thanks
 
Old 05-08-2014, 01:45 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Just go through the manual page of useradd command. As per menual:
Code:
-s, --shell SHELL 
The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by default.
Thus, with other command line options, you can use -s option to specify user's default shell. Moroever, you can use separately use the chsh command to change user's shell (this option may not be available in all Unix variant).
Code:
# chsh [-s shell] [username]
 
  


Reply


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
RHEL 6 - Upon GUI Login Present successful and unsucessful User Login johnmccarthy Linux - Newbie 2 07-24-2013 01:38 PM
Ubuntu/AD/KRB5/LDAP/NIS able to use domain user login with putty, unable in gui login Nitroglycerine Linux - Server 0 06-28-2012 05:17 AM
how do I set different permission for single user for sudo login n direct login? bhaveshvv109 Linux - Security 2 11-08-2011 09:23 PM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 04:44 AM
Crazy blank dialog boxes and windows at login. Can't login as user soren625 Linux - General 2 08-11-2004 07:30 AM


All times are GMT -5. The time now is 01:36 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration