General :: Input To Sudo - What Is Its File Descriptor

Aug 5, 2011

Where does input to sudo go? I mean when we give password to sudo prompt where it actually goes? If it goes to a file what is its name or what is its file descriptor?

View 1 Replies


ADVERTISEMENT

General :: Open Local File Error When Creating File Descriptor?

Sep 14, 2009

error message when I ran my program that I couldn't open my local file. I have two files first one is called client, second one is called server I am using named pipes to sent a message from client to the other file called server in client I used mknod() to create the two named pipes,one for read,one for write and created new thread in client using fork() spawned a child process that executed the server file both named pipes are opened the client file got the message from the user and sent it through the named pipes to the server file when the server receives the message , it needs to verfify it is correct in the server file, a local file descriptor is created to read and send this verifing message when it is not correct but I am getting an OPEN() error when I tried to open this shared local array buff and attach it to a file descriptor where the message is kept why do I get this error in server file

int main()
{
/*both named pipes are open*/
rfd=open(IFIO1,0);
wfd=open(IFIO2,1);

[code]....

View 1 Replies View Related

General :: File Descriptor Redirection And Duplication?

Mar 3, 2010

i've checked the link, and it makes it better. but it doesn't include all the information. i'll continue searching the internet. However i have seen an example of creating a fd:

Code:
exec 5<&1
echo "TEST" >&5
exec 5>&-

as in the page, this was intended to redirect the stdout to the fd 5 and create it, and close it. i have the following questions:- what is exactly the meaning of second command? is it to redirect the command stdout "test" to the fd 5? and how i can see the contents of the fd 5? - in the first command, why the < is used instead if > and what is the difference between the below two commands as in the info bash *Redirection section It will be helpful if anyone could include a graph for file descriptor before and after different command execution.

[Code]...

View 5 Replies View Related

General :: Command For Short File Descriptor?

Jun 25, 2010

the short file descriptor of an ISO file. I have been assigned with a task to match the short file descriptor of an ISO file(to be provided to the customer) to check if thats "Kudgo Support tools" or not.What linux command should I use?

View 6 Replies View Related

Programming :: Get File Descriptor Of An Already Opened File?

Jul 20, 2011

Is there any method to get the file descriptor of a file which is already opened by some other process?

Or any method to get the File descriptor from the filepath ?

View 2 Replies View Related

Programming :: Pyhon - Get The File Descriptor?

Apr 19, 2011

I create two script file name for "a.py" and "b.py", It's through socket connection.
a.py's file writeing "os.pub(s.fileno,x)"create the file descriptor,but i don't know how to get the descriptor file with "b.py"

View 2 Replies View Related

Programming :: What Does Closing A File Descriptor Mean

Mar 13, 2011

As we know, every process has a table with a file descriptor table, in which each entry contains a file pointer pointing to the corresponding file table which contains a v-node pointer pointing to the v-node table.

When closing a file descriptor, are all these data structure deleted?

View 2 Replies View Related

Server :: Can Define Max Limit Of File Descriptor

Jul 7, 2009

We are facing problem of to many file open error because of that application become slow and in tomcat catalina log we get following error frequently Jul 6, 2009 12:27:57 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept failed

at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)

[code].....

no file limit,file descriptor limit for 300 user of tomcat application server and also oracle database server?

View 11 Replies View Related

Software :: Bad Tty & File Descriptor Error While Building RPM On F13

Dec 20, 2010

I have an FC13 x86_64 server and having trouble building RPMs, but I don't think it's specifically an RPM problem. I think it's a tty management or other type of problem.

When spec files have a "%files -f filelist.txt", which contains the list of files for the RPM, it calls the /usr/lib/check-files script, which sorts the files that are supposed to be in the RPM and compares them with the files that are in the built RPM before they are packaged.

The trouble is that the sort fails.

Here's the trace from the check-files script:

The above doesn't show that the output from sort is redirected into those /tmp files. The first sort succeeds because it reads data sent by the "find" in the same shell. The second sort fails because (I think) it cannot read data from stdin for some reason.

What could possibly cause this? I've checked various permissions, libraries, even used strace extensively, all of which is inconclusive.

This is one of my test server boxes, so this problem is something that I've caused, but I have no idea what.

libc controls input and output, correct? Could it somehow be a glibc problem, or a devpts problem? I can run a simple command and pipe it to sort with no problem. It appears to only be related to sub-shells.

I also replaced sort with cat and just tried to redirect stdin in that file to a temporary file, and that also fails.

I've tried running it with selinux disabled and that has no effect.

View 7 Replies View Related

Ubuntu Multimedia :: Starting Jack - Bad File Descriptor

Dec 10, 2010

I am having problems starting jack everytime I try to start it either says bad file descriptor a bunch times or it wont connect to server as client sometime. Other times It just say sorry cannot start jack.

View 1 Replies View Related

SUSE :: Get File Descriptor From Major And Minor Number?

Nov 15, 2010

Is it possible to get a file descriptor from the major and minor number. If so, how can this be done? I am trying to see if a port(eg ttyS2) is opened without using the fdopen or open or fopen functions. is there a way to get the file descriptor of file or port that as already been opened, without using the functions I mentioned above. These functions reopens the port. I am trying to avoid that.

View 3 Replies View Related

Ubuntu Servers :: Maximum Of 1024 File Descriptor Limit?

May 4, 2011

I'm running nginx for static files and as a proxy server for a comet IM server on ubuntu Jaunty. On high load I'm hitting a limit of 1024 file descriptors. I've tried increasing this limit but still can't pass 1024. Does "more /proc/sys/fs/file-nr" gives me the global count of used file descriptors? Why do I see a maximum of 1024 open file descriptors in /proc/sys/fs/file-nr if this is the global count for the machine and each user should have at least 1024 allowed file descriptors by default? Is there a way to increase the limit while the server is running?

Some relevant info on my server:
sudo more /proc/sys/fs/file-nr
1024038001
sudo sysctl fs.file-max
fs.file-max = 38001
sudo nano /etc/security/limits.conf
...
* hard nofile 30000
* soft nofile 30000

I also added this to /usr/local/nginx/conf/nginx.conf:
worker_rlimit_nofile 10240;
Uncommented the following line in /etc/pam.d/su:
session required pam_limits.so

View 1 Replies View Related

Programming :: PyGTK: Send Output From A File Descriptor To A Textview?

Jul 22, 2010

Within PyGTK I'm using gobject.spawn_async to launch a bash script. I would like the output of that bash script to be displayed within my application. I have a textview set up to receive the text ...

Here are the commands that launch the program:

Code:
def run_command(command):
global keep_pulsing
keep_pulsing=True
(cpid, cstdin, cstdout, cstderr) = gobject.spawn_async(command,flags=gobject.SPAWN_DO_NOT_REAP_CHILD|gobject.SPAWN_STDERR_TO_DEV_NULL,standard_code....

Here are the two callback functions. But like I say ... I have no idea how to get that data from the 'cstdout' file descriptor into a textbuffer.

Code:
### THE FOLLOWING ARE GLOBALS:
textview = wTree.get_widget('textview1')
textbuffer=textview.get_buffer()
def update_textview_callback(fd, condition):
global keep_pulsing
if keep_pulsing:
progressbar.pulse()
code....

View 3 Replies View Related

General :: Data From Input File To Be Taken And Send To Output File?

Jul 24, 2010

I am new to shell scripting.What i am trying is to write a shell script which take the input file and output should like as mentioned below.Output file should have data till SOK (marked in red)from every second line and then the selected data(marked in green) from 4th line.So selected data from 2nd and 4th line in one line of O/P file and then similarly selected data from 6th and 8th line in second line of O/P file.Input File:

3c3
< c1111;11.11.11.11;pOK;SOK:abcde;Universe:aa
---

[code]...

View 14 Replies View Related

Ubuntu :: Run Basic Script Without Need To Input Sudo Password?

Aug 19, 2010

I have a basic script that I have thrown together and have created a launcher for it so I can update my computer with one click:

Code:
#!/bin/bash
tty -s; if [ $? -ne 0 ]; then gnome-terminal -e "$0"; exit; fi

[code]...

View 2 Replies View Related

Ubuntu Security :: Scripts Or Applications Cannot Install Without The 'sudo' Prompt And User Input?

Feb 12, 2010

Would it be safe to say that if I build a restricted user: "Desktop" or "unprivileged" user I will be ok? From what I understand - most scripts or applications cannot install without the 'sudo' prompt and user input.

View 8 Replies View Related

Programming :: Bash Scripting With Sudo / Password Prompt And Accepting User Input?

Jul 30, 2011

I'm creating a bash script to do some tasks for me. I would like the script to be run at a set time of everyday. My first question is if it is possible that if one of the commands in the script requires sudo, is there a way to get around it with out making sudo not require a password. Such as, is there a way to include the password in the script? If that is the case, I can always just set the file as read only by sudo. I've been looking for a way to do this, with no success. if I have a command that wants input, how do I give it to the program. For example, if I want to make a zip file that is encrypted, the command would go as:

Code:

zip -r example * -e

now how would I get the script to insert my wanted password.

View 14 Replies View Related

General :: Getting Input From A File?

Dec 2, 2010

I am trying to input from a file. The file's layout has three columns; a department number, a first name and a last name, each separated by a space, for example:

Code:

781-89-4271 Amy Balduff
839-98-4072 Brian Becker
846-43-4284 Christina Brendon

[code]....

I need to input the words through separate variables because I will be passing them to other programs as soon as I can figure this out.

View 9 Replies View Related

General :: How To Get Name In Sudo File?

May 15, 2011

My OS is Linux Fedora 11.PC is IBM 1.8 GiB memory, Intel Duo E8500@3.1GHz.The modem I want to install is a USB stick from 'Cell C' the service provider.The code I got from the internet is for Ubuntu. I am new to Linux. When I type the code in at the Terminal, it tells me that Fdeb (my user login name) is not in the sudo file. How do i get my name in the sudo file?

View 2 Replies View Related

General :: Edit The Sudo File?

Apr 27, 2011

I need to have regular user run this command sync; echo 3 > /proc/sys/vm/drop_caches

but it requires root privileges that I cannot give.

So I figured they could run the command as "sudo". I looked in /etc/sudoers and wasn't sure what I needed to edit for the users to run the following command

sync; echo 3 > /proc/sys/vm/drop_caches

View 14 Replies View Related

General :: Xkbprint Error: No Input File Specified

Mar 18, 2011

when I try to print the current keyboard layout with "xkbprint -o layout.ps" it gives me the error mentioned in the subject. I also remember printing it a couple of weeks ago (and I'm sure I didn't specify any additional options), but now it just doesn't work. Everything I read on the Net assume this command prints the current layout, and so far I haven't discovered even the slightest mention of this error. It's a trifle, but it drives me mad. What could I be doing wrong?

View 1 Replies View Related

Fedora :: Where SUDO File At / Add Myself As A SUDO'er?

Oct 11, 2009

Where is the SUDO file at, and remind me how do I add myself as a SUDO'er?

View 3 Replies View Related

General :: Nawk - Input From A Pipe And A File At The Same Time

Sep 16, 2010

I am tying to read a file in with nawk whilst trying to take input from a pipe. I've come across the getline option and no matter how hard I try, I can't figure out the correct syntax. What I want to do is to take some input from the pipe and make a comparison with all of the values in a file and print a match.

Code:

View 2 Replies View Related

General :: Why Is My Sudo Generated File Owned By Root?

Jul 9, 2010

When I run '# sudo touch newfile' my expectation was that the file would be owned by me, not by root, as my understanding of sudo is that it is giving me, the user, root priviledges but does not actually switch the user.Do I have a fundamental misunderstanding of what sudo is about?

View 4 Replies View Related

General :: Sudo In .desktop File When Launching Graphical App

Feb 8, 2011

Fedora 14 i can run a program with another user with:

But:

it doesn't work, if i put the command in a .desktop file.

View 1 Replies View Related

General :: Root (sudo) Can't Write To File It Created?

Mar 9, 2011

Debugging some of my scripts after upgrading from Debian Lenny to Ubuntu 10.04. In so doing, I tripped over this "problem," the solution to which may give me a clue to others.

On a bash shell command line I created a file thusly:

sudo touch zero_file

and it lists as expected with default permissions 0644:

-rw-r--r-- 1 root root 0 2011-03-09 11:18 zero_file

But then this command fails

sudo echo abcdef >>zero_file
-bash: zero_file: Permission denied

I can place the command (minus the "sudo") in a script & run it under the auspices of sudo & it works. Am I missing something re the stdin redirection when using sudo?

View 9 Replies View Related

General :: Trying Sudo MV Command On File - Permission Denied

Jul 17, 2010

If I try the sudo mv command on the file listed below I get the error listed. I am confused. It is my file & I have permissions. Somehow a slew of files on my system are now showing this way. This seems to correspond when I ran rsync from my netbook to sync it up with my desktop where I am having a problem.

Potential Source ->
sudo rsync -av --delete --rsh=ssh joe@192.168.1.4:/media/Abyss/Memories/ /home/joe/Pictures/

Type of issue ->
mv: cannot remove `100_2259.jpg': Permission denied

joe@Tux-Box:/media/Abyss/Memories/2009/3-09$ stat 100_2259.jpg
File: `100_2259.jpg'
Size: 243012 Blocks: 480 IO Block: 4096 regular file
Device: 811h/2065dInode: 1312030 Links: 1
Access: (0777/-rwxrwxrwx) Uid: (1000/joe) Gid: (1000/joe)
Access: 2010-07-17 11:41:26.708020712 -0400
Modify: 2009-12-13 21:49:59.501938000 -0500
Change: 2009-12-24 05:54:02.854309200 -0500

View 7 Replies View Related

General :: Permission Denied When Creating File (Input Document)

Jul 11, 2011

I am trying to create:

/etc/X11/Xsession.d/95xinput document
where
/etc/X11/Xsession.d is a folder.

So I enter the above commands:
cd /etc/X11/Xsession.d
nano 95xinput

I type my text and when I try to save it it says that permission is denied.

View 7 Replies View Related

General :: Read From Input File And Append To Multiple Files?

Nov 22, 2010

I wanted to be as clear as possible. I have to add hundreds of new servers to hundreds of configuration files in Nagios. Here is a sample structure:

servers.txt has:
SERVER3
SERVER4

[code]....

View 10 Replies View Related

General :: Changing File Permissions Works As Root But Not As Sudo

Nov 22, 2010

I have a really strange problem. I have a few files in a large directory that I want to make readable by everyone. So I try this:

sudo find readme* -not -perm -o+r -exec chmod +r {} ;

and get this:

sudo: unable to execute /usr/bin/find: Success

I don't know why it says Success, because the permissions were not changed. I verified by typing this:

find readme* -not -perm -o+r -exec ls -l {} ;

and get something like

-rw------- 1 root root 536871076 Nov 22 14:06 readme_20101122200429
-rw------- 1 root root 536871892 Nov 22 14:08 readme_20101122200642
-rw------- 1 root root 293458128 Nov 22 14:10 readme_20101122200859

as a last resort, I tried:

sudo chmod +r *

and got:

sudo: unable to execute /bin/chmod: Success

and again Success really means fail. So, I gave up and logged in as root and tried:

find readme* -not -perm -o+r -exec chmod +r {} ;

This time it worked. Why?

EDIT: /etc/sudoers looks like:

## Allow root to run any commands anywhere
root ALL=(ALL) ALL
##Me
user1 ALL=(ALL) ALL

View 2 Replies View Related







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