LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-14-2004, 04:13 PM   #1
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Rep: Reputation: 30
Make a user that can su but not login?


I'd like to make a user that can't login, but that other users (who can login) can su to.

I tried making a user like this:
adduser -s /sbin/nologin emailusername; passwd emailusername

and then when I'm logged in (as another user) and I try to su to that user, I get:
This account is currently not available.

Is what I want possible?
 
Old 06-14-2004, 04:34 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I'm not certain, but if the home page entry is blank in /etc/passwd or /etc/shadow, this may be what you want. But there may be problems even if this works. Why do you want to do this? Maybe there is another way to do what it is you want to.
 
Old 06-14-2004, 05:01 PM   #3
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Original Poster
Rep: Reputation: 30
thank you,

well, the reason I'm doing this is, I have sendmail, qpopper, and pine setup, and I don't want to use the same account for a user's shell access as his email. If I use the same account for both, and someone gets ahold of the pop password (via sniffing or something), then he could login.

That works fine, but the problem is, users who do login can't check their email with pine while they're logged in, because their email is in a different account. But if they could su to that account they could.
 
Old 06-14-2004, 07:11 PM   #4
penguin4
Senior Member
 
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209

Rep: Reputation: 45
Rotwang; have you looked at kb.mandrakeclub.com/index.php/AdminArecov may answers .
or some where in that kb section
 
Old 06-14-2004, 07:23 PM   #5
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Original Poster
Rep: Reputation: 30
I'm not a mandrake club member. Actually, I should've said, I'm doing this in fedora core 2. Although, if there's a solution in mandrake, then i bet something similar would work in fedora.
 
Old 06-15-2004, 11:27 AM   #6
penguin4
Senior Member
 
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209

Rep: Reputation: 45
Rotwang; well yes maybe. but can not do too much harm in trying? it is linux with common thread. thats the maybe.
 
Old 06-15-2004, 11:29 AM   #7
Rekna
Member
 
Registered: Mar 2004
Posts: 33

Rep: Reputation: 15
can't you use pam.d and use access.conf to do this?
 
Old 06-17-2004, 04:21 AM   #8
paeng16
Member
 
Registered: May 2004
Posts: 47

Rep: Reputation: 15
or better yet LDAP!

 
Old 06-17-2004, 04:35 PM   #9
penguin4
Senior Member
 
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209

Rep: Reputation: 45
Rotwang; ? how or why two email progs? if needed then use seperatly with
all users, login seperately also. that may solve problem. try it.
 
Old 06-19-2004, 04:04 PM   #10
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by penguin4
Rotwang; ? how or why two email progs? if needed then use seperatly with
all users, login seperately also. that may solve problem. try it.
Well, the reason I want to let users use both pine and a pop client is so they can check their email:

1. with a rich client like eudora or outlook
and
2. from anywhere by logging in (instead of having to reconfig outlook on whatever PC they're on).

Not sure what you mean by use seperately with all users login seperately.

I was trying to figure out what Rekna is talking about... but I gave up and (sort of) solved it another way:

You can config pine to load a different email box. So, for each user I create two accounts- one that can't login, which is used for email, and one that can login. The one that can login can run pine and load the other user's mailbox.

Works great except the problem is, I still have to figure out how to do permissions so that only those two user accounts and the mail group can access the mailbox. Which I think means I have to create a new group for every user too, plus add the mail user to it every time, that will be annoying..
 
Old 06-19-2004, 04:49 PM   #11
penguin4
Senior Member
 
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209

Rep: Reputation: 45
Rotwang; just as u stated last post; since u r root then config permission
for each usr as u choose. ???
 
Old 06-20-2004, 06:17 PM   #12
Rotwang
Member
 
Registered: Jan 2004
Distribution: CentOS
Posts: 281

Original Poster
Rep: Reputation: 30
Yea that's what I'll have to do, it just sucks because for every person who uses the server I'll need:

1. two accounts: one login, one not,
2. a new group, which both accounts are a member of
3. to add the "mail" user to the new group.

It's very annoying. But it's the only way I've been able to figure out.
 
  


Reply



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
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 07:07 AM
Crazy blank dialog boxes and windows at login. Can't login as user soren625 Linux - General 2 08-11-2004 06:30 AM
How to make a default login name appear at login screen? Arodef Linux - General 0 04-12-2004 02:47 PM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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