LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 02: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, 05: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, 09:02 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Have you read this: http://www.gratisoft.us/sudo/man/sudoers.html
Good explanation, plus examples
 
Old 09-21-2007, 08: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:36 AM
Timezone issues emlsnws Grafpup 2 06-13-2007 10:36 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 04:20 PM
machine timezone sopiaz57 Linux - General 9 11-18-2003 03:09 PM
Timezone Again rch LQ Suggestions & Feedback 5 05-20-2003 12:49 AM


All times are GMT -5. The time now is 01:01 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration