Link to home
Start Free TrialLog in
Avatar of xmouser
xmouserFlag for United States of America

asked on

Solaris acount issues

I have one user who when he attempts to change directories gets: No directory!, if I attempt to su - <username> as root, I get No directory!

The user account is the same as everyone else, I used the same command to create as the others accounts that are having no issues. He has a home directory, he is the owner of it.

I've deleted it and recreated it and the same issue occurs.

Solaris 10.5
Avatar of arnold
arnold
Flag of United States of America image

See
Id user
Finger user
Grep user /etc/passwd
Look who owns the directory that is set as this user's home dir.

Do you autofs to mount user's homedir?

useradd -D
The abode will report the default settings for user creation....

When adding/creating uses if -m is not used the homedir would not be created.
Avatar of xmouser

ASKER

He has a home directory and is the owner of it.

Finger shows details of his home directory.

Logging in as him I get 'could not chdir to home directory /export/home/<username> permission denied'.

Logging in as root doing a ls -alh on /home I show him as the owner of his home directory - permissions are the same as everyone else that has an account.

cat /etc/passwd shows him listed for his home directory.

As to the home directory mount not sure of the command to check if it is 'mounted'
make sure the path to the directory allows the user access
ls -l / | grep export
getfacl /export
ls -l /export | grep home
getfacl /export/home

the user has to have rights to pass through to get to their home directory.
check the same for your user and see if it matches.
usually /export deals with nfs
user home dir is often /home/username if autofs is used to overlay /home with /export/home ...

in short, compare this user with other users that have no issue as to where their homedir is set to.
Avatar of xmouser

ASKER

ls -l /export | grep home drwxr-x--- 28 root root

getfacl /export doesn't support aclent-t style ACLs
Avatar of xmouser

ASKER

No other user is having THIS issue. Funny thing is I deleted the account including the home directory and re-created it and still having the same issue.
Run e same query on any other user and see what is reflected for their homedir.

Look in /etc/passwd do all users have /home or /export/home?
Do you hve centrally managed users using a directory service LDAP, etc.?
Avatar of xmouser

ASKER

cat /etc/passwd shows all the users exactly the same as this one. All have /export/home

ls -alh on the home folder shows perms the same for all the users.

The account is used to log only for this server. If they have to log onto another server they use another account. We don't centrally manage these users (Service Desk).
Your answer is not providing anything on which I can base any suggestion. Something is different.
What is the UID of this user compared to other, who owns the folders and permission.

using getfacl to see advanced permissions on the directory.

Is the /export/home local or is it being mounted via NFS? if so, you have to add this new user (username,uid;group/GID) to the NFS server....

Your question is the same as if I asked you to help me hang a picture. Then simply answer no it does not fit, no it does not stay on after you tell me to put a nail in the wall.

run grep home /etc/vfstab
where is /export/home coming from?
Avatar of xmouser

ASKER

Again: getfacl /export doesn't support aclent-t style ACLs

user in question: UID 135 GID 102

me UID 110 GID 102

another user UID 110 GID 102

grep home /etc/vfstab - just returns to command line with no output

mounted local
usually, anything below 1024 is a privileged UID...
why you and another user have the Same UID, 110?
Avatar of xmouser

ASKER

Sorry typo - his is 128.

These are service center employees who need to traverse folders, create users, move log files.
At this point the issue is not what their tasks are or what they need to do. when they login the shell defined for this user can not traverse to the /export/home/username that you have set.
I think there is a typo in the home dir and that is where your issue starts.
cat -v /etc/passwd | grep otheruser
if you do cd /export/home/otheruser after the user logs in, does it work or errors out?
Avatar of xmouser

ASKER

cat -v /etc/passwd | grep username

username:x:135:102:username:/export/home/username:bin/sh

myname:x:135:102:username:/export/home/myname:bin/sh

cd /export/home/otheruser - permission denied

I did see this on login as this user, didn't notice it before:

-sh:/usr/sbin/quota: cannot execute
your shell should be /bin/sh

where is the .profile .login
do you have quota set on /export/home? vfstab quota?

edquota
Avatar of xmouser

ASKER

I'm sorry I've done it again and there is a typo. I don't have access to the internet from the room the server is at so I've got to write everything down and transcribe it at a desk.

shell /bin/sh

.login is in /export/home/username and I see one in /etc, for my user account I don't see .login in /export/home/myname

.profile: Not sure where that's at can't find it in the usual locations

no quota
everything should be
ls -la /export/home/username

what is the output of useradd -D
this will indicate what the default settings are for user creation.

upon login, see if the user can go into /export
then see if they can go to home
then see if they can go to the users.

outside the quota error, it seems like a permissions issue on the ~username directory
when creating the user you ran:
useradd -u 135 -g users -c 'Someusername' -s /bin/sh -k /etc/skell -m -d /export/home/someuser someuser?

the issue might be a simple option that did not create the directory owned by the user especially...

id otherusername
finger otherusername
return the information you expect?
Avatar of xmouser

ASKER

ls -la /export/home/username - shows me all the users including the account in question.

useradd -D - group=other,1 project=default.3 basedir=/home skel=/etc/skel shell=/bin/sh inactive=0 expire= auths= profiles= roles= limitpriv= defaultpriv= lock_after_retries=

user can go to export

home - permission denied

useradd -g 102 -s /bin/sh -c "username and comments" -d /export/home/username username

However, the above does not create the directory and I have to mkdir after account creation.

finger/id return expected info
IN the last useradd you are missing the -m option.
Look at your useradd -D output, the default home -h points to /home
ls -l /export | grep home
Is the response indicates it is a special file rather than a directory?

If you run ls -la /export/home/username and you see all the users' folders thus means you are following a symbolic link and that might be your issue I.e. /export/home/username -> /export/home
Or -> ../

In any event the username reference in home is a symbolic link ....

What about /home what is there?

If you use -d /home/username?
Avatar of xmouser

ASKER

ls -l /export | grep home - drwxr-x---

contents of home:

drwxr-x--- 2 username tgif  (date of creation) username

All the directories look the same with the exception of each users name.

ls -la /export/home/username

drwxr-x--- 2 username tgif 3 mar 17:16.
drwxr-x--- 29 root root 29 mar 13 16:14..
-rw-r--r-- 1 username tgif 0 mar 13 17:16 .login

user with no issues:

drwxr-x--- 2 username tgif 2 nov  10:06.
drwxr-x--- 29 root root 29 mar 13 16:14..
By all means/measure the user upon logon should have no issues.
Avatar of xmouser

ASKER

Not sure what you mean by means/measure the user upon logon.

I deleted the user, recreated the account using your command:

useradd -u 135 -g users -c 'Someusername' -s /bin/sh -k /etc/skel -m -d /export/home/someuser someuser

User getting: could not chdir to home directory /export/home/username Permission denied.

Which is one of the same issues I had originally.

Contents of the user directory after this creation:

local.cshrc local.profile local.login
When deleting user, was the homedir deleted as well

Userdel username
Userdel -r username
Rename mv username username.bak
Then rerun the user creation command.
Avatar of xmouser

ASKER

users homedir deleted userdel -r username

No username to rename after deletion
Try using homedir -h /home/username username

I can not tell based on the information you are providing what the issue might be

When you run id, finger are all working and non-working users members of the same groups?

Does .login try to run commands?
Avatar of xmouser

ASKER

id finger - everyone is the same

not sure how to tell is .login is running commands

homedir -h... command not found
-h was to change the option

Useradd -D uses -b /home
While you created username with homedir as /export/home/username.

Do you have /home? What is there?


useradd -u uid -g tgif -c "sone user" -b /export/home -m -k /etc/skel -d /export/home/username -s /bin/sh username

useradd -u uid -g tgif -c "sone user" -b /home -m -k /etc/skel -d /home/username -s /bin/sh username
Avatar of xmouser

ASKER

Home has directories of all the users.

Yes I used useradd -u uid -g tgif -c "sone user" -b /export/home -m -k /etc/skel -d /export/home/username -s /bin/sh username
Try using the line with /home/username as the homediR

It might be something simple like a typo that is being overlooked/missed.
Avatar of xmouser

ASKER

Error: Unable to create the home directory. No such file or directory.

useradd ...-b /home -m -k /etc/skel -d /home/username ....
ls -l / | grep home
Avatar of xmouser

ASKER

as root: ls -l / | grep home

drwxr-xr-r 2 root root 2 jun 20 2014 oldserver_home

drwx------ 2 root root 9 mar 10:03 rt_home
df -k
is /export listed ?
grep export /etc/vfstab
Is it presented from another system?
Avatar of xmouser

ASKER

df -k

/export and /export/home are listed
Where are they coming from a local resource or from a remote server as an NFS mount?

It might be something obvious but I can not place a finger on what might it be
Avatar of xmouser

ASKER

I'm told rpool

rpool/export

rpool/export/home
Create a new user with gid of 1024 and see if that user experiences the same issue as the newly created user.
Make sure you use the -b /export/home on the line ....
Avatar of xmouser

ASKER

You mean -d don't you? Anyway - same issues.
useradd has the base which is -b /export/home and homedir as -d /export/home/username

you do not have /home on your system, but your useradd -D (default user creation directive is to use -b /home
if you create a symbolic link in /home that points to /export/home what happens?
ln -s /export/home /home
the strange/difficult things is that on several occations confirmed that the information in /etc/passwd for userA, you, other and someuser reference the same thing, paths, shell etc. and should ....
Avatar of xmouser

ASKER

I  have Oracle onsite Tuesday for other issues but this one has risen to the top so I'll let them figure this out, hopefully.
If you create a symbolic link does it not fix the issue?
Your company might be using other measure requiring additional authorization ...

Presumably no matter how many new users you create no matter their uid, every single one of those experiences the same issue?
Avatar of xmouser

ASKER

Presumably no matter how many new users you create no matter their uid, every single one of those experiences the same issue?

Yes, I've created, recreated about 6 accounts and all have the same issue.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xmouser

ASKER

Big thanks to Arnold.
Could you add what was needed to resolve if non-proprietary items were involved.