Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Please help!!...i can log-in as root but when i try to
do "su - foo" it returns
su: warning: cannot change directory to /home/foo:Permission
denied
could not open session
i have tried creating a new user but the problem remains
with it too...can some help me or point to a link which
tells how su exactly proceeds...from gui login screen only
root can login...help needed desperately...
heavy treat promised...TIA
su with a dash means to also source that users environment, does it work without the dash: "su foo"?
About gui login: this depends on the gui, but kde has a "control center", "System", "Login Manager" section where you (as root) can change who is in the list of users which show up on the login screen. IIRC before you change that, the users must be properly set up, that is, valid home directory and valid shell in /etc/passwd.
i looked at /etc/pam.d/su file & those two lines were
still commented ,but even then to make sure i added user
to wheel group & yet it cant login...
$su <user-name> (without 'dash') gives:
could not open session
i looked at that section in control center but with no
effect...yeah /etc/passwd is properly set...infact i even
added a new user but that again can't login...
As root change to the /home directory, and do a ls -l . See who the owner of the foo folder is.
I am thinking that maybe you created the folder, and forgot to change the owner of the folder to foo, and that is why you are getting permission denied, because when you do a su, it changes the current directory to the users home directory, and it is telling you that the user doesn't have permission to enter that folder.
Thanks Sfin but owners are the users themselves....
does any body has any idea about how su works...i mean
what goes inside it...that will probably help...
i tried changing permissions...but it didn't worked...
one update is this that while shutdown it showed :
identd stopping [FAILURE]
now i dont know much about identd but it's some user
identification protocol so probably it has to do something
with "su"...i tried starting it from init.d scripts but
when checking for status it gives :
identd dead but pid file exists
deleting /var/run/identd.pid or /var/lock/subsys/identd
& then restarting identd gives the same result...i mean
startup goes smoothly but yet ps -e dont show identd!!!
the other thing is this that when i try to
login with the gui interface ,it doesn't works but yet
lastlog shows the user to logged at that time !!!...
ok guys i atleast got my initial environment back by upgrading that user to root level .....agreed that
this is not what i wanted but yet it seemed the only way to me.....i am still waiting for suggestions about
my initial problem cos i dont want to work with root access.....anyone???.....
I can't understand why you have this problem, this works for everyone "right out of the box". Unless ... did you delete some libraries or install some new (corrupted) packages? At this point it might be worthwhile to re-install -- how much work has been done on this box with no users able to login? RH7.3 is out, too, probably a lot of nice new features.
as you must have read I have found a circuitous solution for it (though ofcourse I am open to
suggestions)......no I didn't remember installing anything new or removing some library......yeah
I am also considering 7.3 a try but will wait till winter vacations.....Thanks
Hmmm, I was just playing with su, useradd,passwd, userdel and I don't see any problems, I can create users, set the passwords for new users, and su to/from new users from/to any user account.
Can you post /etc/pam.d/su and so yourself a favor check that all libs in /lib/security/ are intact.
#%PAM-1.0
auth sufficient /lib/security/pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth sufficient /lib/security/pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth required /lib/security/pam_wheel.so use_uid
auth required /lib/security/pam_stack.so service=system-auth
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_stack.so service=system-auth
session optional /lib/security/pam_xauth.so
here is the output of ls /lib/security/ (none of them modified,unless my /bin/ls has itself been modified)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.