Software :: How To Modify System Time As Non Root User

Nov 18, 2010

I have developed an application, in C language, that should received the EPOCH time (6 bytes) at about every 30 min. What function should I use as a non root user to modify the System Time.? The idea is that the same application could update the System Time. I am using Ubuntu.

View 1 Replies


ADVERTISEMENT

General :: Unable To Change System Time As Non-Root User

May 6, 2011

I need to edit the system time as a not-root user. I am carrying out the following actions in my program.

1. Read the User Id of the process. User_ID= getuid()
2. Printing Capabilities(Permitted, Efffective, Inheritable)of the process
3. Setting UID = 0, using setuid(0)
4. Calling the prctl(), function to keep capabilities
5.Switching the UID from root to User_ID of the process
6. What we have now is a process with root capabilities as a non root user
7. On printing Permitted, Effective, Inheritable capabilities, I get the following
--> Permitted = 0xfffffeff = Effective
Inheritable = 0x0; with UID = 1001;
8. I then try and set the system time with --> system("date -s 10:00");
9. I get an error: date: cannot set date: Operation not permitted
10. I am unable to understand as to why I cannot set the time even thought the capability bit CAP_SYS_TIME in the Permitted and Effective sets are SET.

View 3 Replies View Related

General :: Get The Values For The User Time And System Time For A Process?

Aug 4, 2009

get the values for the user time and system time for a process.i have tried getrusage to get values of ru_utime and ru_stimebut these don't seem to be correct

View 3 Replies View Related

General :: Remount Root Filesystem As Read/write After Modify Readonly-root File?

Dec 21, 2010

My linux distro is CentOS 5.3. Today I edited /etc/sysconfig/readonly-root and set "READONLY" to yes, now my /etc/sysconfig/readonly-root file is like this:

# Set to 'yes' to mount the system filesystems read-only.
READONLY=yes
# Set to 'yes' to mount various temporary state as either tmpfs

[code]...

View 3 Replies View Related

General :: Sum Of System And User Time Greater Or Smaller

Apr 7, 2011

1. How sum of system time and user time can be greater than real time ?
2. Even though my program is not waiting for any I/O the real time is smaller than system time as shown

root@chaitu:/home/chaitu/Desktop/Chk# time ./new
real0m0.001s
user0m0.000s
sys0m0.004s

View 4 Replies View Related

Ubuntu :: 9.1 - System Did Not Put Root User

Jan 5, 2010

I started to use Ubuntu 9.1 today. It's the first version of linux I'm using. So my problem is that I always got a message in terminal, that says "are you root?", when I try to do something with apt-get. Well i tried to install a root, but it didn't work. One thing I almost forgot. Root is the Superuser that should be put on, when I installed the current version of ubuntu right? I don't understand how could it happen that the system didn't put the root on.

View 2 Replies View Related

Slackware :: Fsck Not Checking Non-root File System At Boot Time

Apr 21, 2011

Fsck is not check any file system which are not root file system at boot time.

Normally it run: /sbin/fsck -A -R -C -a

But this command doesn't do anything.

I've tried to strace it, and looks like this:

Code:

View 2 Replies View Related

Debian :: No User Can Get Access To System Except Root

Jun 18, 2010

I have a system running with few users and servers (apache/mysql/postfix). After extracting one tar archive in '/home' none of my users are being able to access their home directory. Even other system users (like www-data/mysql) are also not being able to access any directory. Only root can access the system. I have checked file permissions, many files/directories are set to 777 rest are 755.

View 5 Replies View Related

General :: How To Get Time From Power On System To Show User Login View

May 16, 2011

I want to get the time from power on system to showing user login view in Linux, how to do? Can it work only with shell?

View 2 Replies View Related

General :: Root User Account Number For System?

Feb 18, 2010

What is the user account number when you create a root user account for the system during the installation of any linux distribution? I'm not sure if its 0, 1, 10, or 100..

View 2 Replies View Related

General :: Give Total Access To The System To A User Other Than Root?

Mar 9, 2011

How can you give total access to the system to a user other than root?

* Make the user a member of the root group.
* Change the UID of the user to 0.
* Add the user to the /etc/sudoers file.

I think none of these are correct answers.

View 14 Replies View Related

Debian Configuration :: Send Mail From System Commandline As Root User?

Jul 26, 2011

I tried to send mail from my debian system commandline as root user But i did not get the mail in the destination email inbox No errors was shown

View 1 Replies View Related

Security :: Prevent A Non-root User From Shutting Down, Rebooting Or Suspend The System?

Mar 3, 2010

I'm using Gnome and I'd like to still have the ability to reboot/shutdown from one particular account as well as root. How would I modify the chmod command to add this ability?Also, I have a few users who just will hold the power button in to shutdown the machine. How can I keep them from doing this?// Pruned from the vintage 2007 Prevent a non-root user from shutting down, rebooting or suspend the system thread. Please create new threads instead of resurrecting ancient ones.

View 2 Replies View Related

Security :: Sshd Not Working Properly \ System Has Only One User (root) Without Password?

Aug 10, 2010

I have a problem with sshd daemon on a target linux system:The system has only one user (root) without password.The sshd_config looks like:

Code:
Port 22
Protocol 2

[code]...

View 8 Replies View Related

Software :: Change A Process Running In Root-user To Non-root User ?

Oct 28, 2009

Is It possible to change a process running in root-user to non-root-user by setting suid / uid / euid / gid etc... I so please instruct how, when and wat to set in order to change a process running in root-user to non-root user

View 4 Replies View Related

Fedora X86/64bit :: User That Can Only Make The Sound Card Work On A F10 X86_64 System Is Root

May 4, 2009

The only user that can make the sound card work on a F10 x86_64 system is root. For non root users, I am not seeing any error messages when a app tries to use/access the sound card, just nothing plays. As I said, for root everything works as expected. I am sure this is a permission/setup issue, but I have no idea where to start.

View 3 Replies View Related

General :: Basic Script To Modify Time Settings?

Mar 23, 2011

I am trying to write a basic script on a linux box to do the following:change the timezone to UTC. I will need to make sure /etc/sysconfig/clock only has the following:

HWCLOCK=-u
SYSTOHC=yes
TIMEZONE=UTC

[code]....

View 2 Replies View Related

Fedora :: How To Modify The Root Menu

Mar 18, 2010

I am used to a certain root menu. I want to be able to modify the root menu. how do I do it. I mean the menu that come up when I right click on the desktop..

I am on x86_64 FC12 - Gnome.

currently it has "create folder, create launcher etc.. "

View 3 Replies View Related

Ubuntu :: Change User Of Apache2 - Need To Modify?

Mar 4, 2011

I am having dificulting with www-data as the user for apache2. I would like to change the user to my desktop user so that I can limit access to one unknown users. I am also having problems with my wordpress website and the permalink settings. which file I should look at modifing and what I need to modify?

View 9 Replies View Related

CentOS 5 :: Modify Quotas For A Specific User?

Sep 2, 2011

I know if I run repquota -a I can see the quotas set for all users.How do I modify the quota for a specific user?So say the output for john is:User used soft hard grace used soft hard grace----------------------------------------------------------------------john.someth -- 122844 51200 51200 4995 0 0How do I make his block limits 0 so they are unlimited?

View 1 Replies View Related

Ubuntu Servers :: Modify Permission On Jail User?

Dec 3, 2010

Does anyone know how to modify permission on jail user. current jail user added to its /home/jail/*

How can I assign jail user(s) enough permission to access /opt, /var, or any other directories other than /home/jail/* ?

View 9 Replies View Related

Fedora Networking :: Modify The Script To Allow Non-root Users Similar Features?

Mar 28, 2011

I spent some time programming a useful script which presents the user with a UI of all the samba/W2K8 servers and shares on the domain and they check off the shares and the script maps them. The script can only be run as root because mount doesn't allow users to execute. I was asked to modify the script to allow non-root users similar features. I was able to get this working by running the commands:

Code:
# chmod +s /sbin/mount.cifs
# chmod +s /sbin/umount.cifs

Can someone please explain to me what the 's' option means? The man pages only go as far as to say that it allows for setting suid but I don't really know understand that means or what the implications are by doing this. In a perfect world I would like to create a security group and add users into that group and then grant that group permission to run mount.cifs/umount.cifs rather than making such a drastic global change to a core binary. how I might go about granting members of a group permission to run hand-selected commands like mount.cifs?

Post added at 07:07 PM Previous post was at 04:40 PM Ok, I read up on the /etc/sudoers man page and I think I have a more elegant solution to this problem of user mountable samba shares. I restored my mount.cifs back (chmod -s /sbin/mount.cifs) and I used visudo to grant the access.

Code:
%smbusers ALL=NOPASSWD:NOEXEC:/sbin/mount.cifs,/sbin/umount.cifs
This allows any users in the smbusers group to run mount.cifs/umount.cifs with sudo but without being prompted for a password.

View 2 Replies View Related

Server :: Apache Does Not Have Permission To Modify Files In User Directory - SVN

Mar 30, 2010

I recently started using SVN with Apache for my web development, although I find it really annoying that I have to issue two SVN commands (one local, one remote) to update my web site. I have been looking into SVN post-commit hooks to solve this problem. The only problem is that apache does not have permission to modify files in my user directory... So here is how everything is setup. I am running Slackware 13 full install. There have been no installations overriding any of the default installs.

[Code]....

View 1 Replies View Related

Debian :: Modify To Automatically Grant Root Privileges And Execute Commands When Starts?

Aug 22, 2010

I'm connected to the internet using a wireless router. Each time I boot, I have to grant root privileges and type in a shell: iwconfig wlan0 essid linksys key dhclient wlan0 Isn't there a file(or location) that I can modify to automatically grant root privileges and execute these commands when debian starts? Something like autoexec.bat in windows.

Something else I'd like to mention is when I execute iwconfig.... for the first time, I get this incomplete result:

IEEE 802.11bg  ESSID:"linksys"
Mode:Managed  Access Point: Not-Associated   Tx-Power=27 dBm
Retry  long limit:7   RTS thr:off   Fragment thr:off
Encryption key***********
Power Management:off

[Code]...

View 4 Replies View Related

Ubuntu Security :: Set Permissions Like Windows - User Can Delete Files But Can't Modify

Jul 16, 2011

look at this : Uploaded with ImageShack.us how can set permissions in linux like this? I want one user can delete files but can't modify them and ... in linux i have 3 group to assign read write and execute them. is ntfs flexible than linux file system?

View 4 Replies View Related

Software :: File Create/modify/delete Monitoring With User Account?

Jan 27, 2011

We are looking to monitor and log selected application file systems for file create/modify/delete changes that will also include, user account that changed/deleted the file, file name and date and time of event. Everything I have looked at does not seem to provide all of the information that we need.Inotify seems to monitor modify/create/delete but does not seem to provide the user account. Auditd seems to monitor modify/create/append with user account, but not deletes.We need to provide this information to auditing for Sarbane Oxley compliance.

View 3 Replies View Related

Ubuntu :: Why The User Created At Installation Time Is A Custom User Instead Of An Administrator

Oct 31, 2010

why the user created at installation time is a Custom User instead of an Administrator.

View 4 Replies View Related

Debian :: Iceweasel Properties Access - Forbid User To Modify Proxy Settings Of Browser

Oct 24, 2015

I want to forbid a user to make changes to preferences of iceweasel, specifically to modify proxy settings of the browser. Although user should still be able to use the browser.

I assume these settings are stored in some file on a harddrive? If so, what is this file and can i simply make it read-only for users? Or any other solution?

View 4 Replies View Related

Programming :: How To Modify System Kernel

Dec 7, 2010

For my work, I have to modify the routing lookup process at Linux kernel.

The details is below:

A-----B.

We have pcA, pcB (using Linux OS kernel 2.6.26.5) connect together. We need to modify the source code of kernel at B in order to if A sends the packets with destination IP address as C, pcB still receives this packet and send to transport layer (that means, it bypass the routing lookup process at kernel).

The solution I used as the following code...

View 12 Replies View Related

OpenSUSE Install :: Get Root Privileges On User Account Without Using Root Login?

Feb 5, 2011

i am having problems with privileges i have created a new user with my name, but i cant get root privileges on it. i need the same privileges as the root profile.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved