Click to See Complete Forum and Search --> : User dir..


Marian
04-15-2002, 07:25 AM
Hi, I got a question, it's about user dir (home). Can I set/move it to another place? And another thing: How can a user run a program which only can run with root rights? I hope you can help a newbie like me :)

Wolff
04-15-2002, 07:30 AM
Why do you want to move HOME ?

Don`t know if this answers your question but you can change owner to a programm with the CHOWN command.

Are there any specific programs you have problems executing as a regular user ?

Marian
04-15-2002, 07:32 AM
I got the questions for a report in school and I don't know where to look or what to write :)

z0mbix
04-15-2002, 07:40 AM
that's cheating! Is it something you're supposed to be studying. Have you checked google.com/linux? I'm happy to help but not when you're cheating/cheating yourself!

demian
04-15-2002, 07:44 AM
Originally posted by Marian:
<STRONG>Hi, I got a question, it's about user dir (home). Can I set/move it to another place? And another thing: How can a user run a program which only can run with root rights? I hope you can help a newbie like me :)</STRONG>

The home dir of a user is defined in the /etc/passwd file (it's the sixth field). Change that entry to whatever you like and then move the data from the old home dir.

To run a program that requires root permission the root user needs to set the SUID bit on that file meaning the program will run with the privileges of the owner of the file.

cdrecord is a typical example of a file the needs the suid bit set so users can burn cds. You can set the appropriate permissions with chmod 4710 cdrecord which will result in cdrecord having the permissions -rws--x---. On my system the ownership of cdrecord is root.burner so that root and every user who is member of the burner group can run cdrecord.


edit: When I started writing I didn't see this is an assignement you have. I'll leave my response there anyway. However, had I known this beforehand I wouldn't have replied.

[ 15 April 2002: Message edited by: demian ]

Marian
04-15-2002, 07:55 AM
I was told by my teacher/boss that I could go here to ask for the questions, he recommended it to me, so it isn't cheating.

z0mbix
04-15-2002, 08:10 AM
Originally posted by Marian:
<STRONG>I was told by my teacher/boss that I could go here to ask for the questions, he recommended it to me, so it isn't cheating.</STRONG>

are you studying linux then? So can you really tell me that getting an answer here is the best way to learn. I just hope you now go and research demain's answer to see what it all means and why you do what he has suggested otherwise you will learn nothing!