Ubuntu :: How To Set Python Path For Root User

Aug 11, 2010

How do I set the PYTHONPATH for the root user only? Or at least add to the python path for the root user? I need to read from the /var/log/apache2/access.log in my python script, so I need to use sudo for my script to be able to read from it.I tried setting the PYTHONPATH in /root/.bashrc but that didn't work. I don't want to use a .pth file because I don't want the directory to be on the path for all users due to import collisions.

View 6 Replies


ADVERTISEMENT

CentOS 5 Networking :: How Do I Set Sbin In Default Path For Non Root User

Jun 25, 2009

I'm running a server with CentOS 5 where the software that needs to run on the server uses ifconfig to verify the system IPv4.The problem is that /sbin isn't set for the user that is supposed to run the software (sadmin) which means the software can't execute ifconfig and thus terminates.now the workaround I've been using is simply to input.

View 10 Replies View Related

General :: Can PATH Statement Be Used With Python In Ubuntu 9.10?

Oct 10, 2010

On Ubuntu 9.10 I installed Python 3.1.1 successfully with Synaptic Package Manager. However the Python interpreter cannot find my scripts, currently in /home/dave/pycode. This appends _temporarily_ but python remains clueless about location of my scripts. Searched Internet and some speak of .rc or .bashrc or .profile..files. Found some of these and opened with Komodo : they are Linux script files and I am clueless as to how to modify.Currently I can import my scripts only if I change to the /pycode dir before running.Lutz's Python book says to change PATH file - Ha .Sobell's "A practical Guide to Ubuntu Linux" is no help. Ubuntu's own on line help is worth less than a fart in a hurricane. Ubuntu's gedit would not even open bash.bashrc.

View 7 Replies View Related

General :: Specifying A Directory Path In Python?

Nov 20, 2009

I'm trying to write a script in python to extract data from maillogs in gz format. I wrote a shell script but i now want to do this in python, as thats the preferred method where i work. anyway does anyone know how to specify directory paths for example the maillogs exist in /var/log so i want the script to go to that directory would LOG_DIR="/var/log/" work?

View 1 Replies View Related

Ubuntu Multimedia :: OpenShot Has Not Been Installed In Python Path

Feb 1, 2010

When I run openshot it spits out this:
Code:
Added /usr/share/openshot to system path
OpenShot (version 1.0.0)
*** ERROR: MLT Python bindings failed to import ***
*** ERROR: MLT Python bindings failed to import ***
Error: OpenShot has not been installed in the Python path.
(Both the site-packages and /usr/share/openshot folders were checked)

Use the following command to install OpenShot:
$ sudo python setup.py install
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner self.run()
File "/usr/share/openshot/classes/thumbnail.py", line 174, in run mlt.Factory().init()
NameError: global name 'mlt' is not defined

View 1 Replies View Related

General :: Specifying The Install Path Of A Python Package On Server?

Jun 23, 2010

I have been trying to install the NumPy package for Python on to my home directory, as I run as part of a server and do not have permissions to install new packages in the Linux server.

I have set up Python in my home directory, and have configured ~/.bash_profile to find my local Python (which works, confirmed by testing).

However, when I attempt to install the NumPy package, I get the message error: could not create '/usr/local/lib/python2.6': Permission denied Which I find strange because I do not see why it would need to install files anywhere except my local Python directory.

how I might be able to specify the directory in which files are installed?

View 2 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

Slackware :: Default PATH - Python: Can't Open File 'SABnzbd.py': [Errno 2] No Such File Or Directory

Nov 24, 2010

I have just installed SABnzb application in my home folder. The executable file is SABnzb.py When I run the command in the Konsole # python SABnzb.py I have this Quote: python: can't open file 'SABnzbd.py': [Errno 2] No such file or directory

View 5 Replies View Related

Ubuntu :: Add PATH Variable In Root Terminal

Mar 16, 2010

I want to add a path (/usr/sys) to the global $PATH. I will use this to test commands and scripts, which I don't want to be mixed up with regular commands. I've added the path to /etc/environment. When I start a terminal session under my user account, the path is included in the $PATH variable. However, when I start a root terminal, it is not. Is there a way to to change $PATH on one place where it will also affect the root terminal, or do I have to change it on 2 locations?

View 4 Replies View Related

Ubuntu :: Root User Directory Does Not Exist, Root Password Not Recognised?

Oct 26, 2010

I no longer have access to my root desktop. On a session I attempted to change the root username but i apparently assigned it a wrong directory that does not exist. When I rebooted with my new root username, i was instead recognised as a simple user (no root privileges). I tried the console to change to "old" root but root password is not accepted and there is no way to access to sudoer files. it seems that inserting a new username requires root privileges and i am back to square one. Simply logging with old root username and password after restart gives me a blank screen with nothing on it and cannot even reboot.

View 9 Replies View Related

General :: Did Not Find Any Option For Root Password For Root User In Ubuntu 9.10?

Mar 2, 2010

i used opensuse 11.1 ...there is option for root user to create password for root...but for ubuntu i did not find anything like that...so how can i create root password....or how can i use root

View 1 Replies View Related

Ubuntu :: Set Java Path For All Users - Including Root

Jan 27, 2010

I am trying to set my java path so that it is in effect for all users including the root user. I set the path correctly in /etc/profile and that works for my personal user, but when i try to run the same commands using sudo, i get messages saying that it can't find the java path.

View 3 Replies View Related

Programming :: Python Gconf Not Working When Ran As Root?

Jan 23, 2010

This is the case. I run openSUSE 11.2 with GNOME. I want my desktop wallpaper to automatically cycle on a fixed interval. So I found this script (change-background.py), edited it to match my needs, and put it in my home bin directory. The script runs fine.

change-background.py

Code:
#!/usr/bin/env python
#
# change-background.py
#
#

[Code]....

View 6 Replies View Related

Red Hat / Fedora :: Root Search Path ?

Aug 31, 2010

I am trying to find the permissions of the directories in the $PATH variable.

I am trying to use the following:

View 1 Replies View Related

Server :: Root PATH Isn't Right, Can't Change?

Apr 2, 2010

After upgrading to CentOS 5.4, my root path seems screwed.The issue is present for CRONJOBs that run as the root user as well as when I su to the user through SSH.

I need the following path ALWAYS:
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
It currently only gives root:

[code]....

View 4 Replies View Related

Ubuntu :: Root-User : Unset The Root Password?

Oct 14, 2010

A friend of mine has told me to set a root password and use root (f.e. switching to su in terminal and work with root rights instead).Is there any way to unset the root password? I know how to use sudo now.

View 9 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

General :: Root Logins Are Not Allowed \ When Try To Login As Root, After Logging Out As User, It Does Not Allow?

Dec 2, 2010

i just installed linux mandriva 2009. i set password for root and created a user account. when i try to login as root, after logging out as user, it does not allow me and gives the error "root logins are not allowed". even it does not show the root account. if i try to go to root from konsole terminal using su root, it allows to enter as a root but when i try to start the GUI with startx it gives error.not sure what to do and why i can't see my account in GUI mode

View 5 Replies View Related

Software :: Permanently Add Path To Root Via Script ?

May 10, 2010

I'm working on my first .deb package. I need to add the /usr/sbin directory to $PATH for root. I think the easiest way to accomplish this is to add a little code to the postinst file.

View 5 Replies View Related

Ubuntu :: Bash Script, Take User Input Then Use It As A Path?

Jan 29, 2011

I'm trying to make a script to make it quicker to encode videos.

Code:
#!/bin/bash
echo "Type the path of the video file"

[code]....

View 9 Replies View Related

OpenSUSE Network :: Root User Has Access To Remote Folders/files Of Any User?

Jan 21, 2010

Prelude: OpenSUSE 11.2 (2.6.31.8-0.1-desktop), installed Novell client 2.0 SP2 (novell-client-2.0-sp2-sle11-i586.iso).

I found that if any usual user is logged into a NDS-tree, then _local_ root has full access to user's network shares, including the user's home directory located on remote Netware-server. Is it by design or
have I missed something? Nevertheless in windows local admin has no access to network resources mounted of any other user. If you runas shell (as admin) then admin in principle can't "see" network shares which were mounted (connected) by other users - they are accessible ("visible") per session.

View 3 Replies View Related

General :: Change Password For Newly Created User And Root User Using Graphical?

Jan 15, 2010

I am using mint 8 for a 2 weeks, I am noob to linux but I like Mint than any other linux distro which is great alternative to windows. I have a problem regarding password reseting.

1. My laptop automatically get logged in without asking user name and password.

2. I tried to change password for newly created user and root user using graphical way but it does not work.

2. I can perform administrator task using only OEM user which is default inbuilt user of mint.

How can make my laptop to ask password when mint get booted? How to change password for other users?

View 1 Replies View Related

General :: Potential - With Adding /usr/local/[s]bin To Root's Path?

Mar 2, 2011

I've noticed that the root account $PATH does not include /usr/local/bin or /usr/local/sbin by default. Are there any potential issues that could arise from adding those directories to the path? If so, what is the best way to make sure your shell finds executables in those directories, without affecting the stability and security of the system?

View 2 Replies View Related

General :: Adjusting $PATH In /etc/profile Does Not Affect Root

May 25, 2011

I added a directory to the $PATH variable in /etc/profile. This works for my user account but not for root. It's easy to add it to my /root/.bashrc but I would like to understand whats's wrong. It's a widely unmodified Debian 6 so I think my changes should do the trick.

Here is what my /etc/profile looks like:

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then

[code]....

Edit: The path I added is the distcc-stuff. Here is what echo $PATH tells me:

$ echo $PATH
/usr/lib/distcc/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

View 1 Replies View Related

Ubuntu :: Broken Path To User Shell - Can't Complete Login

Jun 9, 2011

I inadvertently typed the wrong path when changing my user login shell and now every time I log in I get a message stating that it can't find the shell and boots me off the system. It will then redisplay the login prompt. I'm running Ubuntu Server x64 in VMware Workstation.

View 1 Replies View Related

Software :: Gimp Script-fu Or Python-fu User Interaction?

May 16, 2010

Is it possible to get user interaction in these scripts? They are for batch processing is my belief so perhaps not, but I would like to make a function whereby I can click it, a selection box of an exact size appears, I then place the selection box and press something, a new file is born. Is this possible?

View 1 Replies View Related

Debian :: Alter The User's Environment Path?

Feb 2, 2011

what the correct way is to add '/sbin' to my users environment path which is not present when I run the command 'env'?

Code:

carlos@db1:~$ env
TERM=xterm
SHELL=/bin/bash
SSH_CLIENT=192.168.1.115 35495 22
SSH_TTY=/dev/pts/0

[code].....

I would like to add /sbin to all future user's I create with 'useradd' and including my already existing user account above. Can someone tell me the correct way in Debian to change my current user environment to have /sbin in their path as well as how to add this for all future users? I looked at /etc/profiile and there are two lines that look relivant:

Code:

if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else

[code]....

I'm guessing the 2nd PATH line is for users and the 1st one is for root, right?

View 3 Replies View Related

Fedora :: Search Path - Yum & Rpm Commands Fail When Executed As Root

Jul 15, 2009

I've setup dimdim (opensource, centos 5.3) and noticed yum & rpm commands fail when executed as root because it uses librpmio from openoffice3 instead of /usr/lib (I'm running from memory so I may have misstyped). But sudo doesn't have this problem.

How can root's search path be different, especially after I state /usr & /usr/lib at the top of /etc/ld.so.conf.

View 2 Replies View Related

Programming :: Use Glade With C/python To Create A Graphical User Interface

Jan 30, 2011

I am working with ubuntu (linux) and have to create a graphical user interface. The GUI is a 2-D plot that have to plot a point. The point ( x and y co-ordinates) are not hardcoded, and are coming from another file (another piece of code written in c / python). I was thinking to use Glade with c/python to create this. But, I am not sure how to start with this.

View 4 Replies View Related

OpenSUSE :: Checking For Javah In User's PATH... Not Found?

Jun 26, 2010

I try to install some scientific software from source and get the following warning, when I run ./configure:
...

checking for javah in user's PATH... not found
checking for javah in known locations... not found
configure: WARNING: Invalid JNI include dir, exit!

[code]....

View 5 Replies View Related







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