LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Logging in non-root users fails either with "no shell" or no directory (http://www.linuxquestions.org/questions/linux-newbie-8/logging-in-non-root-users-fails-either-with-no-shell-or-no-directory-794160/)

Doc_X_Doc 03-09-2010 04:21 AM

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

vinaytp 03-09-2010 04:25 AM

May be this one

Code:

useradd -d /export/home/<username> -m -g <groupnname> -s /bin/bash <username>

jamescondron 03-09-2010 05:00 AM

What happens if you drop the -m flag, is it needed with the -d flag? Or are they competing?

Doc_X_Doc 03-09-2010 05:11 AM

Quote:

Originally Posted by vinaytp (Post 3891276)
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 (Post 3891300)
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.

jamescondron 03-09-2010 05:27 AM

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?

Doc_X_Doc 03-09-2010 05:51 AM

Quote:

Originally Posted by jamescondron (Post 3891334)
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.

jamescondron 03-09-2010 06:02 AM

No, exit status; run the command as

Code:

useradd <blah, blah> && echo $?

Doc_X_Doc 03-09-2010 06:15 AM

Quote:

Originally Posted by jamescondron (Post 3891378)
No, exit status; run the command as

Code:

useradd <blah, blah> && echo $?

With -m option

64 Blocks
0


Without -m option
0

jamescondron 03-09-2010 06:21 AM

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?

Doc_X_Doc 03-09-2010 06:39 AM

Quote:

Originally Posted by jamescondron (Post 3891395)
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?

jamescondron 03-09-2010 06:44 AM

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.

Doc_X_Doc 03-09-2010 07:14 AM

Quote:

Originally Posted by jamescondron (Post 3891424)
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?

vinaytp 03-09-2010 07:18 AM

Quote:

Originally Posted by Doc_X_Doc (Post 3891474)
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.

jamescondron 03-09-2010 07:28 AM

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.

Doc_X_Doc 03-09-2010 08:21 AM

Quote:

Originally Posted by vinaytp (Post 3891486)
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 (Post 3891496)
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.


All times are GMT -5. The time now is 08:25 PM.