LinuxQuestions.org
Visit Jeremy's Blog.
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 12-04-2009, 05:25 AM   #1
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Rep: Reputation: 15
Exclamation user login


Hi Friends,

I have a query about non-interactive login..

I want to add a user "test" with non-interactive login.
Step: useradd -s /sbin/nologin test
passwd test
--
--

Now I want to #su test

But I am getting the below error.
"This account is currently not available" message.

I have also make some changes in /etc/security/access.conf file but no luck. How can we do this???

testisallow console logins to all but a few accounts.
#
#-:ALL EXCEPT wheel shutdown sync:LOCAL
#
# Disallow non-local logins to privileged accounts (group wheel).
#
#-:wheel:ALL EXCEPT LOCAL .win.tue.nl


Thanks-
 
Old 12-04-2009, 05:30 AM   #2
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
it's because test account has default shell /usr/bin/nologin (also can be /sbin/nologin) or something like that, which produces that message and then exits.
to change shell permanently:
Code:
chsh -s /bin/sh test
. run
Code:
su -s /bin/sh test
to login under test once with shell /bin/sh (a safer way, if you aren't planning to use test later permanently).

Last edited by Web31337; 12-04-2009 at 05:44 AM.
 
Old 12-04-2009, 05:47 AM   #3
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Actually I want to su from that user test permanently. I have heard about that I have to make some changes in profile file, but I don't know exactly, any more idea??
 
Old 12-04-2009, 05:56 AM   #4
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
in that case you can do chsh as i specified. does that help?
 
Old 12-04-2009, 06:04 AM   #5
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
That will change the shell but I don't want to change the shell.
 
Old 12-04-2009, 06:09 AM   #6
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
then i know only one solution-specify -s with su everytime. because if there is "nologin" shell on account, this account cannot do anything.
 
  


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
One user login cannot start scim, other user logins and root OK allend Slackware 3 05-08-2008 08:25 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
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 12:39 PM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-06-2004 12:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:49 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