Programming :: C++ Codes To Check Whether User Is Root Or Has Admin Rights

Jan 8, 2011

One of the feature in my application involve changing of hardware setting. This require the user to be root or have administrative right.Before my application enable that feature, I want it to check whether the user is "root" or not, or whether user use "sudo" command to run the application or not, or whether the user has administrative rights or not.What are the codes or library that can do this?

NOTE: Sometimes, advanced linux user may set the user id of root to something else other than 0. So, getuid() may not be helpful in this case.

View 4 Replies


ADVERTISEMENT

General :: How To Give Full Admin Rights To New User?

Jul 14, 2011

I have created a new user using sudo adduser "user1" from the root .but this user does not have full admin rights...How to give full access to this user1?

View 3 Replies View Related

Server :: Giving AD User Local Admin Rights In Ubuntu

Jul 16, 2009

I'm having a bit of a problem after joining Ubuntu 9.04 to my company's Windows Domain. I can log in and use sudo just fine but I don't have access to certain things in my menu (i.e. "Add/Remove Software") and I can't open the User Manager. I manually edited the /etc/group file as root and added my username (username@domain) to the appropriate groups but still no luck.

View 2 Replies View Related

Ubuntu :: Admin / Root Rights Login To Edit And Read Files

Feb 12, 2011

I'm a new Ubuntu user and a Python programmer, it's the first time that I use Python in Ubuntu so it's a bit confusing me. If I want to save a Module or something in a specified map, I get 'Errno 13', it says that I don't have permission to edit, do thing in that map. And this is also for importing files with Python. I logged in from Terminal with 'sudo -i' and closed Terminal, but the problem keeps repeating. How do I login as Admin or Root and stay as Admin or Root? I need right to edit/read files as well as root and normal user.

An example:
Python file:
test.py ->
test = open('/a.txt', 'w')
test.write('Test - Test - Test')
test.close

When I execute this, I get in the Python IDLE the 'Errno 13' problem and below the 'Errno 13' it says that I don't have permission. Who know how to stay logged in as root, even if the user has not logged in or isn't this possible, if it isn't then I just want to get files moving, editing/erasing etc.

View 9 Replies View Related

Ubuntu :: Give Chmod Rights To Another User Using Root?

Jul 18, 2011

I have my own 16GB sandisk cruzer flash drive, I've already mounted him and can read on my own user, but I can write on it only using root. how can I give my user Chmod +x on the folder /media/XXX ?

View 7 Replies View Related

Debian Configuration :: When User Is Admin Root Password Is Still Needed

May 7, 2015

I'm using Debian Jessie Cinnamon right now. I've got 1 user account on my machine--fred--as well as root, of course. "fred" is an administrator, and many times that is enough for root priviledges, for example, I can install packages via apt or dpkg. However, I cannot access "Users and Groups", or install packages via GDebi, with my password. For that, I have to have the root password.

I know that it is possible to let the admin account handle everything and not even need root--for example, Mint and (I believe) Ubuntu do it this way. I don't know how, though.

Code: Select allgroups fred
fred : fred cdrom floppy sudo audio dip video plugdev netdev lpadmin scanner bluetooth

I did disable the root account by Code: Select allsudo passwd -l root to see if it would make any change. Nothing different happened except that I now can't use GDebi or access "Users and Groups" since the root account and therefore password is inactivated. Not a big deal to get it back, though.

View 10 Replies View Related

General :: Assigning Admin Rights To Apps?

Sep 30, 2010

I am using linux mint and have installed Netbeans on it but whenever I run netbeans from accounts other than root it throws an error for not having permission to start glassfish server of netbeans. I also tried running this application using run as administrator option but then the application does not start.

So is there a way to assign netbeans admin rights permanently so that whenever I start this application from other accounts I should not face this error?

View 2 Replies View Related

Ubuntu :: Lost Admin Rights After Updating To 10.4?

Apr 30, 2010

I cant change my user settings (password, login screen settings etc) after upgrading to 10.4 on my desktop pc. It says I don't have rights. I'm the only user, no other profiles. Otherwise seems to be working fine!

View 1 Replies View Related

Ubuntu Security :: 10.10 - No Admin Rights For Administrator

Oct 22, 2010

I am only user on this ubuntu 10.10 install. I have admin rights but when I try to change some settings via Ubuntu tweak unlock or alter user and groups via advanced tab I never get the option to enter my password. I have added a new user 'tempuser' via safe mode and this user is administrator too but everything works fine from this user..

Results from $ grep admin /etc/group
lpadmin:105:heath,tempuser
admin:119:firstuser,tempuser,heath

Results from groups
admin adm dialout fax cdrom floppy tape audio dip video plugdev fuse lpadmin sambashare
I am thinking of making a fresh install if I cant sort this but would like to fix if possible.

View 9 Replies View Related

Ubuntu :: How To Get Admin Rights And Change Default OS

May 4, 2011

I've got a Dell laptop with a dual boot with Ubuntu and Windows 7, but I want windows 7 to be the default OS. I can't seem to find anything on Ubuntu with any information. I had a look at some forums and it said I need to go into admin, but I don't think I have it. Does anyone know how to get Admin rights and how to change the default OS?

View 4 Replies View Related

Red Hat / Fedora :: Possible To Make Install With Just Admin Rights

May 25, 2010

I have moved to a new place and they expect me to work without root access to my machine, but I need to compile and make some software. However I get the following error:

mkdir: cannot create directory '/usr/local/ope': Permission denied
chmod: cannot access '/usr/local/ope': No such file or directory
mkdir: cannot create directory '/usr/local/ope': No such file or directory
chmod: cannot access '/usr/local/ope/bin': No such file or directory
make[1]: *** [/usr/local/ope/bin] Error 1
make[1]: Target '_installall' not remade because of errors.

I have been allegedly been given admin rights - but do I need root to do this?

View 4 Replies View Related

Ubuntu :: Somehow Lost Ability To Gain Admin Rights

Feb 2, 2010

I am semi new to linux and i was getting the hang of it until just recently. I'm trying to do some web design using php and mysql. In my reference material (the all in one desktop reference {for dummies}). At some point I needed to do something in /var/www but I ran into a permissions problem so I typed:
Code:
chgrp -v -r guy0203 /var/www
405 chgrp -v -R guy0203 /var/www
406 chown -v -R guy0203 /var/www

Afterwards in some subsequent step it suggested putting the files in /usr/src/mysql. Since I didn't have that folder I used mkdir and created it. Then I tried adding the files I needed to that folder and got denied on the grounds of not having permissions once again. So tried something like this:
Code:
451 chmod 777 /usr/
452 sudochmod 777 /usr/
453 sudo chmod 777 /usr/

It was a 755 originally but I couldn't copy those commands. It turns out as that I had two terminals open in different desktops. one of them was a root terminal. It was at this point that realized that I was in that root terminal and decided I was done 'learning' for the day. I decided to listen to some music (which is located in my windows partion) and ran into a problem. The prompt that pops up to normally asks me for my admin PW to mount the drive. Now just vibrates like an incorrect entry was received, says authentication error and says I am not authorized to mount that drive then I went back to terminal to fix it, and when I tried to elevate myself to SU:

I got this:
Code:
guy0203@guy0203-laptop:~$ sudo su
sudo: must be setuid root
guy0203@guy0203-laptop:~$

I don't know what to do now but I think I totally killed this OS. If so is there anyway to save things if I have to reinstall?

View 9 Replies View Related

Ubuntu :: Time On Custom Distro Without Admin Rights?

Jan 10, 2011

I created a custom linux distro that originated from ubuntu server and I installed time-admin and want to change the time without admin rights. Is this possible?

View 1 Replies View Related

Ubuntu Servers :: Portable OpenVPN Without Admin Rights?

Feb 4, 2011

I have OpenVPN setup and running on my home server (Lucid Lynx). I move around alot and use Portable OpenVPN to connect to my home server. The problem is a lot of the computers I use I do not have admin rights to install the necessary routes to connect. So my question is this. Can OpenVPN be configured to use PPTP protocol? Because I have PortableVPN on my U3 flash drive and that VPN client does not need admin rights to run. If OpenVPN cannot do this, and from my understanding of its archetecture it cannot, but I must admit i am no authority on the matter. Can you suggest a workable solution, ie. install and setup this server software and use this portable client software.

View 1 Replies View Related

Server :: Windows 7 Local Admin Rights Using A Samba 3 Domain Controller?

Jul 23, 2010

i have a ubuntu server box with samba 3 as domain controller with all windows 7 clients.i am wanting all users to have local admin rights so they can install programs etc.

View 1 Replies View Related

General :: How Can I Install A More Modern Version Of GNU Utils (coreutils) On Debian Linux With No Admin Rights?

Jul 1, 2011

I would like to install a more modern version of GNU utils (coreutils) on a debian linux system where I have no admin rights. Is there a way to do that?

The rationale is that I need a more modern version to the one installed in the system where I intend to run my analysis. I am trying to use "sort -R" or "shuf" to randomize lines in a big text file.

View 1 Replies View Related

Ubuntu :: User Account Control And User Rights Assignment?

Sep 29, 2010

I have a user account which is required to run as part of the operating system and as a service. I am currently attempting to install my companies software on an Ubuntu desktop via wine just for the purpose of finding out if it's do-able.

Is there a way, in Ubuntu, for a user account to be given the local rights assignment to act as part of the operating system and to function as a service in the background?

View 1 Replies View Related

Programming :: Check If A String Entered By User Starts With A Particular Pattern Or Not?

Feb 4, 2010

How do i check if a string entered by a user starts with a particular pattern or not?

View 3 Replies View Related

Ubuntu :: No SUDO Access When Admin User Created Through Kubuntu User Manager?

Jan 6, 2010

Original HOWTO can be found at: [URL]... So the other day I was in IRC and someone had brought up a problem where they created a new Administrative user, but didnt have rights to use sudo. Looked into the problem a little bit to figure out what was wrong, and it turns out that when you create a new user through the user manager (in kubuntu, anyways. Havent tested in Gnome.) the user gets added to the adm group, however, a quick look at the sudoers file shows that its looking for users in the admin group to allow the use of sudo. So, to solve the problem we do the following: If youre on the new admin user (which Im assuming you are) use the following commands:

Code:
su [insert username of old account without brackets]
sudo usermod -G admin [username of new admin account without brackets]
exit

Then simply logout, and then log back in (not always necessary, but the easiest way to flush the permissions.)

Code:
su [insert username of old account without brackets]
Means were going to Switch User to the old admin account
Code:
sudo usermod -G admin [username of new admin account without brackets]
This simply adds the admin group to the secondary group list for the new user
Code:
exit
Pretty self explanatory

View 4 Replies View Related

Programming :: Check If The User Is In Correct Directory Before Executing Bash Script

Dec 10, 2010

I have been searching for 90 minutes for something that I "think" should be fairly easy. I'm pretty new to Bash Scripting so I could be completely wrong. Then again it may be a weird request to even need something like this. But here it is.I have a script written to convert data from one of our software version to another. The only thing I need to add to it is a "check to make sure the user running the script is in the /tmp directory".

View 7 Replies View Related

Software :: Compile .jar Java Byte-codes Into Native Machine Codes?

Aug 28, 2010

I think I put this in the wrong place

View 1 Replies View Related

OpenSUSE :: No Rights To Access DVD, Even As Root?

Jun 1, 2010

When I insert some homemade DVDs of a friend, I can't view its contents. DVD works fine on windows XP, but not on opensuse. Dolphin gives an error: access denied to /media/071114_1638.I can't do a chown command because dvd is read-only...And when I do an ls -l I get:

Code:
ls -la /media/071114_1638/
ls: can't access /media/071114_1638/.: Permission denied
ls: can't access /media/071114_1638/..: Permission denied

[code]...

View 9 Replies View Related

Security :: Kernel Flaw Coughs Up Root Rights

Oct 21, 2010

Quote: The open-source Linux operating system contains a serious security flaw that can be exploited to gain superuser rights on a target system. The vulnerability, in the Linux implementation of the Reliable Datagram Sockets (RDS) protocol, affects unpatched versions of the Linux kernel, starting from 2.6.30, where the RDS protocol was first included.

According to VSR Security, the research outfit that discovered the security hole, Linux installations are only vulnerable if the CONFIG_RDS kernel configuration option is set, and if there are no restrictions on unprivileged users loading packet family modules, as is the case on most stock distributions.

View 3 Replies View Related

Server :: Can't Seem To Remove Rights For A Remote Root Connection?

Apr 2, 2011

I can't seem to remove rights for a remote root connection. Below you can see that the rights are present before and after the successful revoke command. I am using the correct command.

[Code]...

View 1 Replies View Related

Programming :: Run Software Compiled As Root On User?

Jul 27, 2009

I've compiled some code which I've given to other people, however when they try to run it they get segemtation fault. After some testing I've found if it's ran from root (where I compiled it) everything works, if I try to run from a user there's a fault.

View 3 Replies View Related

Ubuntu :: User Rights In Apache2 - Cannot Edit Anything

Dec 19, 2010

I'm new to Ubuntu and wish to use the system in combination with Apache/mySQL/phpMyAdmin. I managed to get phpMyAdmin working for now. Also mySQL database seems to work. Only problem is Apache2. I can start the server and it is working. However in the folder /var/www/ where all site files are stored, I can not edit anything. I have been reading about sudo nautilus which did allow me to change administrator rights for the folder, but still I do not get it working to display other than the default index.html page. Is there a manual or quick solution for me so I can use apache with Ubuntu?

View 2 Replies View Related

Debian :: Classifying User Rights To Use Programs

Aug 14, 2009

I want to classify my users, based on what kind of programs/binaries they can use.Users of group Bronze, can use programs
A, B and C

While users of group Silver can use programs of Bronze, in addition
D and E

While users of group Gold can use programs of Silver, in addition
F, G, H

Any Idea on how to do this?I am curious on how sdf.lonestar.org is doing this...

View 2 Replies View Related

Programming :: Non-root User Determine Which Days The Computer Ran?

Mar 22, 2010

Is there any way a non-root user can programmatically determine which days the computer ran during, say, the last month?

The information is in /var/log/messages.* but those files are root:root 640.

Non of the world-readable /var/log files on the Slackware 13.0 development system can be used:boot Not present if boot logging not enabled (default). dmesg No timestamps. lastlog Not enough info. wtmp Rewritten on each boot so not enough info. EDIT: not correct: by default wtmp is rotated weekly and kept for one month as configured in /etc/logrotate.conf xdm.log Not present if xdm not used. Xorg.0.log Not present if X not run.

View 5 Replies View Related

Programming :: How To Create Raw Socket With Non Root User Successfully?

Jun 30, 2011

I am writing a ping kind of program for my own application. This application needs to run with non root user privileges. This needs me to create a raw socket. But the ping connection is failing because of creating raw socket with non root user.How can I run the application successfully with non root user privileges using raw socket creation?

View 4 Replies View Related

Programming :: Use Pthread Scheduling Policy Without Root User?

Jan 12, 2011

I am working on a large program in C to run on Puppy Linux. I have multiple pthreads running. I want to be able to set the pthread SCHED_POLICY and priority in my program but I want a user to be able to run the program without root privilege.
Using a sticky bit and root ownership gives the user too much power because they will be able to write and compile their own scripts. Is there a way to use 'sudo' when I set the thread parameters from my program or something like this?

View 1 Replies View Related







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