LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2007, 01:49 PM   #1
mambley
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
Sudo Timezone


Hello Guys,

We are trying to allow a user that has not root permission to change the Time and Timezone. I've been reading and testing all day without results. I know that I can do that with sudo but I'm not an expert in the application. Can anybody help me telling me how can I do that?

Thanks for your help guys

Raul
 
Old 09-20-2007, 04:04 PM   #2
ChrisScott
Member
 
Registered: Nov 2006
Location: St Albans, England
Distribution: Fedora c3/5, Suse pro 10/openSuse 10.2, RHES, Zenwalk.....
Posts: 97

Rep: Reputation: 15
sudo would require a password anyway. There is a simpler was... add a sticky bit to the program:

Code:
su -
chmod 4777 `which date`
This will cause the app to be ran as the owner (in this case root), whoever executes it!
 
Old 09-20-2007, 08:02 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Have you read this: http://www.gratisoft.us/sudo/man/sudoers.html
Good explanation, plus examples
 
Old 09-21-2007, 07:36 AM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally Posted by ChrisScott View Post
sudo would require a password anyway. There is a simpler was... add a sticky bit to the program:

Code:
su -
chmod 4777 `which date`
This will cause the app to be ran as the owner (in this case root), whoever executes it!
This is not good advice. There is almost never a good reason to create a world writable SUID file. Go the sudo route. The password that sudo prompts for is the user password you can keep root to yourself. If you really feel the need to get rid of the password prompt, there's always the NOPASSWD option.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
Timezone issues emlsnws Grafpup 2 06-13-2007 09:36 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
machine timezone sopiaz57 Linux - General 9 11-18-2003 02:09 PM
Timezone Again rch LQ Suggestions & Feedback 5 05-19-2003 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration