LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-05-2002, 09:39 AM   #1
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Rep: Reputation: 15
Unhappy su - <user-name> giving problem


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
 
Old 08-05-2002, 10:23 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Ok, take a look at
/etc/pam.d/su file
it is enough documented, maybe you have a line there that requires the user to be in the wheel group
 
Old 08-05-2002, 10:36 AM   #3
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
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.

Hope this helps,
-Bob
 
Old 08-05-2002, 11:42 AM   #4
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
Thanks for replying neo777777 & bbeers:

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...
 
Old 08-05-2002, 01:25 PM   #5
Sfin
Member
 
Registered: Apr 2002
Location: Michigan
Distribution: Slackware 8.0
Posts: 197

Rep: Reputation: 30
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.
 
Old 08-05-2002, 02:05 PM   #6
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
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...
 
Old 08-05-2002, 03:05 PM   #7
elkrammer
LQ Newbie
 
Registered: Jul 2002
Location: Chile
Distribution: Debian Sid
Posts: 29

Rep: Reputation: 15
I don't know if what i'm going to tell you is good but you should try...
As root type:
chmod 777 /home/yourusername

Obviously changing the yourusername with the user you want...


Hope it helps...
 
Old 08-05-2002, 11:06 PM   #8
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
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 !!!...
 
Old 08-05-2002, 11:33 PM   #9
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
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???.....
 
Old 08-06-2002, 03:34 AM   #10
rasejo
LQ Newbie
 
Registered: Aug 2002
Posts: 29

Rep: Reputation: 15
how do you create a user account?
 
Old 08-06-2002, 05:06 AM   #11
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
adduser / useradd
most of the distributions have either of them....read man pages...
 
Old 08-06-2002, 08:03 AM   #12
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
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.

-Bob
 
Old 08-06-2002, 09:16 AM   #13
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
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

A-dummy
 
Old 08-06-2002, 09:55 AM   #14
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
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.

Last edited by neo77777; 08-06-2002 at 09:56 AM.
 
Old 08-06-2002, 10:45 AM   #15
A-dummy
Member
 
Registered: Jun 2002
Location: Kanpur,India
Distribution: RH-7.0 , 7.3
Posts: 130

Original Poster
Rep: Reputation: 15
here is my /etc/pam.d/su:

#%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)

pam_access.so
pam_console.so
pam_cracklib.so
pam_deny.so
pam_env.so
pam_filter
pam_filter.so
pam_ftp.so
pam_group.so
pam_issue.so
pam_lastlog.so
pam_limits.so
pam_listfile.so
pam_localuser.so
pam_mail.so
pam_mkhomedir.so
pam_motd.so
pam_nologin.so
pam_permit.so
pam_pwdb.so
pam_radius.so
pam_rhosts_auth.so
pam_rootok.so
pam_securetty.so
pam_shells.so
pam_stack.so
pam_stress.so
pam_tally.so
pam_time.so
pam_unix.so
pam_unix_acct.so
pam_unix_auth.so
pam_unix_passwd.so
pam_unix_session.so
pam_userdb.so
pam_warn.so
pam_wheel.so
pam_xauth.so

frankly, none of these files make any sense to me ......
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Giving root privileges to another user BlackJackal Mandriva 5 10-19-2005 01:03 PM
Giving a User Root Privileges lawrencegoodman Linux - Newbie 4 12-23-2003 04:41 PM
user permissions giving me annoyances hypermegachi Slackware 3 11-01-2003 02:48 PM
Giving a user rights Help!!! Sabeer Linux - Newbie 1 08-25-2003 12:02 AM
giving a user poweroff permission Goatdemon Slackware 7 07-19-2003 06:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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