LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 03-09-2010, 04:21 AM   #1
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Rep: Reputation: 0
Logging in non-root users fails either with "no shell" or no directory


Hello,

I tried to create a user on Solaris 10 but when I try to login the user with "su -" I get the error message "no directory". When I try to login with "su" I get the error message "no shell".

I tried the useradd several combinations e.g.
useradd -d /export/home/<username> -m -g <groupnname> <username>

All the tries i made didn't work. I also checked the permissions on /etc, /bin, /sbin and / and it seems ok so that the newly created user can access them.

I hope anybody has an idea.

Thanks
 
Old 03-09-2010, 04:25 AM   #2
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
May be this one

Code:
useradd -d /export/home/<username> -m -g <groupnname> -s /bin/bash <username>
 
Old 03-09-2010, 05:00 AM   #3
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
What happens if you drop the -m flag, is it needed with the -d flag? Or are they competing?
 
Old 03-09-2010, 05:11 AM   #4
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by vinaytp View Post
May be this one

Code:
useradd -d /export/home/<username> -m -g <groupnname> -s /bin/bash <username>
I also tried with bash shell (ksh too) but same error messages. I also used the command above to double check, still the same errors.

Quote:
Originally Posted by jamescondron View Post
What happens if you drop the -m flag, is it needed with the -d flag? Or are they competing?
If I don't use the -m flag, the directory is not created. So I created it manually with mkdir and made a chown user:group to give the new user the rights on the directory. Still the same errors.

I also checked with pwck if the /etc/passwd file is correct. I don't get an errors.
 
Old 03-09-2010, 05:27 AM   #5
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Gotcha, thats something that ought to be fixed up stream then, if the -d flag doesn't assume -m.

What is the exit status with useradd?
 
Old 03-09-2010, 05:51 AM   #6
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
Gotcha, thats something that ought to be fixed up stream then, if the -d flag doesn't assume -m.

What is the exit status with useradd?
With -m option I get the exit status 64 blocks.
Without -m option I don't get any message after creating the user.
 
Old 03-09-2010, 06:02 AM   #7
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
No, exit status; run the command as

Code:
useradd <blah, blah> && echo $?
 
Old 03-09-2010, 06:15 AM   #8
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
No, exit status; run the command as

Code:
useradd <blah, blah> && echo $?
With -m option

64 Blocks
0


Without -m option
0
 
Old 03-09-2010, 06:21 AM   #9
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Well, they're both convinced they've succeed properly. The directories are being created? They do exist? They're looking correct in /etc/passwd?

Is /export/ on a network filesystem? Is that started before login?
 
Old 03-09-2010, 06:39 AM   #10
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
Well, they're both convinced they've succeed properly. The directories are being created? They do exist? They're looking correct in /etc/passwd?

Is /export/ on a network filesystem? Is that started before login?
Directory is created when using -m option, not without. I have created the user with -m again.

/etc/passwd looks fine

test:x:101:110::/export/home/test:/bin/bash

pwck does also show no errors.

How do I find out that /export/ is a network filesystem?
 
Old 03-09-2010, 06:44 AM   #11
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Well are you running nfs, samba or any other network filesystem? I imagine you'd know if you were, its just that putting this on /export/ is a bit of an odd place to put it.
 
Old 03-09-2010, 07:14 AM   #12
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
Well are you running nfs, samba or any other network filesystem? I imagine you'd know if you were, its just that putting this on /export/ is a bit of an odd place to put it.
The problem is that I haven't installed the Solaris on the server and the person who installed is currently not available. How do I find out what filesystem is installed?

Could this be the problem that I can't access new created user?
 
Old 03-09-2010, 07:18 AM   #13
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by Doc_X_Doc View Post
The problem is that I haven't installed the Solaris on the server and the person who installed is currently not available. How do I find out what filesystem is installed?

Could this be the problem that I can't access new created user?
You may check file system support like this in Linux. Don't know same thing applies to Solaris
Code:
ls /sbin/mkfs.*
Hope if you post your thread here. You are likely to get more responses.

Last edited by vinaytp; 03-09-2010 at 07:31 AM.
 
Old 03-09-2010, 07:28 AM   #14
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Well is this a fileserver? Are people using files on here on other machines? You could check for files such as /etc/exports to see if they're exporting directories on things like nfs.
 
Old 03-09-2010, 08:21 AM   #15
Doc_X_Doc
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by vinaytp View Post
You may check file system support like this in Linux. Don't know same thing applies to Solaris
Code:
ls /sbin/mkfs.*
Hope if you post your thread here. You are likely to get more responses.
I thought this is the right are because of Linux-Newbie. Is there a possibility to move the thread to the Solaris area?

Quote:
Originally Posted by jamescondron View Post
Well is this a fileserver? Are people using files on here on other machines? You could check for files such as /etc/exports to see if they're exporting directories on things like nfs.
No it is not a fileserver, just a normal server where nobody needs to access files from different computers.

/etc/exports does not exist.
 
  


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
Logging in as root get "/bin/bash: Permission denied" MikeyCarter Linux - Software 12 06-09-2008 10:44 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
execve fails with "No such file or directory" TTux Programming 2 07-22-2006 02:17 AM
"users.allow" and "users.deny": under what directory, in Mandriva? KWTm Mandriva 0 10-09-2005 02:23 PM
Users "logging in" log file jdruin Linux - Security 2 07-31-2003 10:53 AM


All times are GMT -5. The time now is 12:30 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration