- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Stupid question with su
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
12-08-2005 08:06 PM
12-08-2005 08:06 PM
Stupid question with su
the root user have the possibiliti to su with another.
How make the ability to a simple user to make su -c to another user without give password
Thank you for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 08:11 PM
12-08-2005 08:11 PM
Re: Stupid question with su
"To use su, the appropriate password must be supplied unless the current user is superuser."
You might want to look at a tool called sudo. An internet search for sudo will point you in the right direction.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 08:29 PM
12-08-2005 08:29 PM
Re: Stupid question with su
typing password when you are root user.
but if you want to login another user without password,
it can be possible the user is root group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 08:34 PM
12-08-2005 08:34 PM
Re: Stupid question with su
if a files file is owned by "toto"
when anyone execute it it will be executed with a euid of "toto".
if you want that only the user "tata" uses that program you can make a launcher for that program which check that the ruid is the autorised user, then exec the porgram you want.
to set the set user id bit do a chmod 4555.
Anybody can execute it and will have a euid of toto when executing it.
If you want to limit the use of that program to a group - chmod 4550
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 10:50 PM
12-08-2005 10:50 PM
Re: Stupid question with su
Dear Wood !
" su " to another user defenetly requires a passwdord ! Unless you are root.
With Regards,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 11:10 PM
12-08-2005 11:10 PM
Re: Stupid question with su
Unless you use and configure sudo, your only other alternative would be by rlogin
in newuser's home you should have the .rhosts file with a line like:
host user(name)
All the best
Victor
P.S
I would go for sudo, its far more cleaner and secure (only root can give the priviledges...).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 11:52 PM
12-08-2005 11:52 PM
Re: Stupid question with su
with ssh and with a rsa key.
or just the simple:
main()
{
int ruid,euid,suid;
getresuid (&ruid, &euid, &suid);
if (ruid!=406) /*406 is the only user allowed to use that program*/
{
exit (1);
}
setresuid (euid, euid, euid);
execle("/bin/id","id",0, 0);
/* the last 0 is to reduce the env to nothing, even PATH will be not defined
if a PATH is needed then you will have to
call
execle("/bin/id","id",0, myenv);
where myenv is declared as:
char *myenv[]={"PATH=/bin:/usr/bin","A=123",0};*/
}
# cc t.c
# chmod 4555 ./a.out
# su toto
# id
uid=406(toto) gid=406()
# ./a.out
uid=402(laurent) gid=406()
To avoid security risks, make it as simple as possible, don't make dynamically choosable programs, limit the parameters no none if possible