- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- diasbling a generic functional account from loggin...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2005 02:51 AM
03-01-2005 02:51 AM
I'm looking for a little help with stopping a generic account logging into 1 of our UNIX servers.
I would like the users to login with their own account and then su to this account.
The account in question needs to have it's full permission other than logging in directly, because there's cron jobs and ftp jobs associated with this account
What I tried so far was adding the below to the /etc/profile, while this works for stopping direct logins it also stops su logins to this account as well which i don't want
uid=$(whoami)
if
[ "$uid" = cpsbatch ]
then
echo "Sorry user account $uid is prohibited from logging in directly to $HOSTNAME"
sleep 5
exit 0
fi
Thanks
Paddy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2005 02:58 AM
03-01-2005 02:58 AM
Solution"whoami" returns just the username of the current shell.
If you use "who am i" it will return the original login name of the original login as the first feild on the line, but even after using su, it still returns the username you originally logged in as.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2005 02:58 AM
03-01-2005 02:58 AM
Re: diasbling a generic functional account from logging in directly
telnetd : user_name_to_be_prohibited_from_direct_login
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2005 03:00 AM
03-01-2005 03:00 AM
Re: diasbling a generic functional account from logging in directly
Try changing the user's shell to /sbin/false. This will allow the user account to login in via ftp but not directly, and may work the same for what you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2005 03:00 AM
03-01-2005 03:00 AM
Re: diasbling a generic functional account from logging in directly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2005 03:19 AM
03-01-2005 03:19 AM
Re: diasbling a generic functional account from logging in directly
Thanks All for the other replies as well.
Kind regards
Paddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 12:54 AM
03-02-2005 12:54 AM
Re: diasbling a generic functional account from logging in directly
Don't forget to assign points too!