- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How do I force users to su to a non-root account?
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
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
12-04-2001 08:47 AM
12-04-2001 08:47 AM
I have an account (non-root) that I want to force users to "su" to. Is that possible?
Thanks ...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 08:49 AM
12-04-2001 08:49 AM
Re: How do I force users to su to a non-root account?
Good Luck,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 08:51 AM
12-04-2001 08:51 AM
Re: How do I force users to su to a non-root account?
This would be possible if you create(incase you don't have one) a file in /etc/securetty
add an entry called console in that.
This would only allow su to all the users if they want to root access
Goodluck
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 08:53 AM
12-04-2001 08:53 AM
Re: How do I force users to su to a non-root account?
Try:
su - username
exit
in the last 2 lines of the .profile file of the user.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 08:56 AM
12-04-2001 08:56 AM
Re: How do I force users to su to a non-root account?
If it was in their .profile, the user could Cntl-C out of the su, granted they are not a novice. Making it their shell gives them no option.
Uday,
The console entry in /etc/securetty only allows root logins from telnet and rlogin at the console, it does not affect other users.
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 08:59 AM
12-04-2001 08:59 AM
Re: How do I force users to su to a non-root account?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:03 AM
12-04-2001 09:03 AM
Re: How do I force users to su to a non-root account?
Yes, Craig you are ok. But you can use stty command in the .profile to lock the contol-C, and you can develop with shell a menu to access the system with many options.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:04 AM
12-04-2001 09:04 AM
Solutionhttp://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7924cbaac6dcd5118ff40090279cd0f9,00.html
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:04 AM
12-04-2001 09:04 AM
Re: How do I force users to su to a non-root account?
/etc/securetty with an entry of console disallows telnet and rlogin attempts as root, root can only login on the console.
Geez, was that so hard.
Sorry for my giberish,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:06 AM
12-04-2001 09:06 AM
Re: How do I force users to su to a non-root account?
Yes you are right, forgot about that option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:12 AM
12-04-2001 09:12 AM
Re: How do I force users to su to a non-root account?
This does not seem to be in line with the answers given above! However, I think this is what you want.
if you have a generic non-root user account, say informix you obviously do not want users to directly telnet or rlogin into those accouts as there is no audit trail. In effect you want a /etc/securetty for regular users (I think). I do not know of such a beast. However, if in the .profile of informix you put
wai=$(/usr/bin/logname)
if [ $wai = informix ]
then
echo "Access denied, use su - user"
exec sleep 5
exit
fi
Obviously these files cannot be owned by informix so make them owned by root & readable
# chmod 440 ~informix/.profile
OR
# chmod 444 ~informix/.profile
# chown root:informix ~informix/.profile
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:21 AM
12-04-2001 09:21 AM
Re: How do I force users to su to a non-root account?
can you clarify the question? Do you want users to automatically su to that account when they login?
Or do you want that non-root account to only be used by "su" to it, instead of direct login? An example would be a database generic account such as "oracle" or "sybase". Can't think of a great way for the first scenario. For the second, I've accomplished that by modified /etc/profile in the same way that Tim suggests doing in a local .profile. Either way will work, but I prefer /etc/profile as it makes it a bit easier to administer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:23 AM
12-04-2001 09:23 AM
Re: How do I force users to su to a non-root account?
There is no HPUX mechanism such as securetty for non-root accounts. I believe you will have to put edits in /etc/profile to do what you want (or /etc/csh.login if a csh account).
You may try putting the edits in the account's .profile but you would have to put sticky bit on the directory, chown the directory to root, and generally a bunch of stuff that makes life more difficult for that account.
There's a number of threads along this line in the forums. My best search results are from search.hp.com on something like: +login +su +restrict
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 09:24 AM
12-04-2001 09:24 AM
Re: How do I force users to su to a non-root account?
The code is good, but you can't protect anything that goes in a users .profile....
Remember that the user 'informix' owns it home directory, so they can delete any file in there. If I was the informix DBA, and the code you'd added was annoying me I'd do this:
cp .profile .profile.new
< remove those annoying lines in .profile.new>
rm -f .profile
mv .profile.new .profile
So to stop this you must add the code to /etc/profile, which is also run at login, but the user *can't* edit or change
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 10:08 AM
12-04-2001 10:08 AM
Re: How do I force users to su to a non-root account?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2001 12:21 PM
12-04-2001 12:21 PM
Re: How do I force users to su to a non-root account?
C