User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Linux Users Lounge section within the Tech Talk category of DaniWeb, a massive community of 425,936 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,602 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Linux Users Lounge advertiser: Lunarpages Linux Web Hosting
Views: 2124 | Replies: 2
Reply
Join Date: May 2004
Posts: 10
Reputation: ajcamp is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
ajcamp ajcamp is offline Offline
Newbie Poster

Block User but allow su -

  #1  
May 17th, 2007
Anyone know how to block a user from TTY login, thus forcing them to use their personal login, BUT then allowing them to su - to the blocked account?

Changing shell to /sbin/nologin/ also blocks su - access.

Do I need to use PAM to do this? Ugh.

Thanks
AJ
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Location: Worcester, Massachusetts
Posts: 180
Reputation: Toba is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 3
Toba's Avatar
Toba Toba is offline Offline
Junior Poster

Re: Block User but allow su -

  #2  
Jun 22nd, 2007
passwd -l username
passwd -u username to unlock again

man passwd for more details.
what? WHAT?
Reply With Quote  
Join Date: May 2004
Posts: 10
Reputation: ajcamp is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
ajcamp ajcamp is offline Offline
Newbie Poster

Re: Block User but allow su -

  #3  
Jun 28th, 2007
Hi,

That will lock the initial login, and also prevent su - <user> from working as well.

To enable su - <user> I had to give the users sudo access,
and prevent su to root:

ALL ALL=(ALL) NOPASSWD: /bin/su - <user> , ! /bin/su *root*

Andrew
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Linux Users Lounge Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Linux Users Lounge Forum

All times are GMT -4. The time now is 9:21 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC