General :: Write A Shell Script That Allows Only User 1 And User 2 To Execute A Program?

Feb 25, 2010

I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?

View 1 Replies


ADVERTISEMENT

General :: Write A Shell Script Which Will Simultaneously Collect OS User Information And Write In An Individual Text Files?

Feb 17, 2010

I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.

View 8 Replies View Related

General :: How To Run Program As User With No Shell

May 27, 2010

I have a program I want to run as it's own user. But I don't want anyone to be able to login as that user, so I created a user like: -

useradd -s /sbin/nologin someuser

How do I run a specific program owned by this user as this user? I can't su to this user as it doesn't have a shell.

View 15 Replies View Related

General :: Write Shell Script That Give A Number Between 1-3444 From User

Feb 18, 2011

i want to write shell script that give a number between 1-3444 from user and if user enter out of range number give error e.g number must between

read -p "plz Enter Number " p
while [ $p != [1-9] -o $p != [1-9][0-9] -o $p != [1-3][0-4][0-4][0-4] ]
do
read -p "plz Enter Valid Number" p
done

but this have an error in while statement ! two many argument

View 3 Replies View Related

General :: Write A Shell Script Which Will Read The Directory Path As Input From User?

Nov 28, 2010

I am new to writing shell scripts. So, please bare with me. I am currently trying to write a shell script which will read the directory path as input from user and will traverse the Dir tree to find all available audio and video files. I have tried to write as much as I could but I don't know where I am making mistake as I get some files to be audio file which are actully tar balls. On the second note there are some files which video but script shows them to be audio. And, some video files are completely skipped. I am giving the shell script below so that you can see. I am using two external files as source which I am attaching.

Code:

#!/bin/bash
#Let's load the extensions that we want to search for
vdExt=$(cat vdExtList)
adExt=$(cat adExtList)

[code]....

View 5 Replies View Related

Fedora Security :: Execute Program By Ordinary User?

Feb 27, 2011

My program attributes (it uses semanage to change range): I'd like to ordinary user (bartek) can execute my program. I executed as root:

chmod u+s se_chmod4

so now my user can change his range in permissive mode by my program. My politic: In enforcing mode i can see attributes but when i want to excute i get:

How should look like my TE file that user (bartek) could execute my program (forget at moment about "semanage")?

View 8 Replies View Related

General :: Login As Other User Using Shell Doesn't Load The Profile For That User?

Dec 11, 2009

I am using the sudo command to log on locally as another user by the following command:

sudo -u theotheruser -s
or
sudo -u theotheruser sh

As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.

View 11 Replies View Related

Programming :: Write A Perl Script Which Will Give An Interactive Session To A User To Execute Command On The Server

Feb 25, 2011

I am trying to write a perl script which will give an interactive session to a user to execute command on the server. I have written a small script to do this :

Code: !/usr/bin/perl -w
use strict;
use Net::SSH::Perl;
my $host = '192.168.1.1';
my $username = 'user';
my $login_passwd = 'test123';

[Code]...

View 2 Replies View Related

Server :: Make A Normal User Execute Commands Of The Super User's?

Jul 3, 2010

I have a question that i want to make a normal user to execute the commands which the root user is able to execute, say if i have a user named siru and when i logged in using siru i cannot run commands like tracert,nmap@loccalhost and all but i can run when i have logged into root account so my question is how to make siru to run the command tracert,nmap@localhost.I have even edited the .bash_profile of siru's home directory from

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then

[code]...

View 1 Replies View Related

Software :: Create User With Password And Read / Write Privileges For Program Database

Oct 11, 2010

Unless your distro has taken care of it Centos 5.5, you'll need to create a user with a password and read/write privileges for program database. You can do this using the MySQL command line client if you are familiar with it. Well I am not familiar with it, so I wam wondering how to do it. As well when I run

mysql - p program </usr/share/program/mysql.sql>

It asks for a password. how do i find out this password.

View 1 Replies View Related

General :: $HOME/.bashrc Disabled When User Shell Is 'rbash' (restricted Shell)?

Jun 15, 2011

MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.

View 2 Replies View Related

General :: Allow User To Execute Faillog

Aug 11, 2010

I want to allow a user to reset people's faillog. When I go into the /etc/sudoers file and put this syntax in I still get an error stating : /var/log/faillog permission denied.

Here is what I put syntax:

%user ALL=/usr/bin/faillog,/var/log/faillog

View 1 Replies View Related

General :: Execute Firefox As It's Own User ( SUID )?

Jun 8, 2010

i was wondering if it is possible to run a program such as firefox or any other internet program as its own user (ie user firefox), but still in my desktop session, this way the program would have its own home folder and store all the data there, while i use it normally, i was trying to set the suid on the firefox binaries but then it doesn't starts at all.

View 6 Replies View Related

General :: How To Allow User To Execute All Commands Without Sudo

Apr 30, 2010

Customer asked me to create a menu for linux he also asked me to do this: Open like a command like where a user can execute commands...so for this the users have sudo enabled. The code below works OK. But it has an issue when a command is executed but the command does not need sudo

Like for instance
Code:
cd /
sudo: cd: command not found

How can I allow a user to execute all commands when a command does not need sudo
Code:
echo -e "Press Control+C to finish"
#echo -e " "
while true;
do
read whichcmd?"Insert Command: "
sudo $whichcmd
done

View 3 Replies View Related

General :: Execute A Command On X-session Owned By Another User?

Jul 13, 2011

Is possible (by root of course) to run a command from console, that will be executed on X-session owned by another user on the same linux box/machine ? Example: Can root open xclock for another local user logged into X11 ?

View 2 Replies View Related

General :: Script Which Will Login To Particular User And Execute Some Commands?

Mar 19, 2011

I am trying to write one script. Purpose of my script is that it will login to particular user and it will execute some set of commands.What I was trying....


#!/bin/bash
su - tom
ls -lrt

[code]...

View 6 Replies View Related

Programming :: Send A Run Program Command To Shell Thats Located In /home/user/myapp Using ./myapp From Irssi?

Mar 26, 2010

I am currently working to develop a perl script for irssi that will capture data from irc channel hold it in memory as variable and send it to a shell. Does anyone know a good irssi irc scripting guide? something that will include $botname, $msg, $nick, $channel etc scripting explanation. Is it possible to send a run program command to shell thats located in my /home/user/myapp using ./myapp from irssi? i am using bash. I've only just started, so i dont have any code written yet,

View 2 Replies View Related

General :: Give Permission To Execute Process As Super User?

Jul 27, 2010

I have a program(that is written by me) which need super user permission to execute it. But I need to let the normal users to execute it without using 'sudo ./executable' and just './executable'. how i can set the program to execute by the normal users without using 'sudo' or password prompting.

View 2 Replies View Related

General :: Best Way To Allow A User To Write To The /var/www Directory?

Mar 3, 2010

On my laptop for testing, I simply chown each subdir of /var/www to my myuser:www-data. But, now that I am setting up a public facing server, I'm wondering if this is the proper way to do so? If not, what is the best way to allow a non-root account to write to /var/www.

View 4 Replies View Related

General :: How To Add User So That They Have No Shell Access?

Feb 18, 2010

Im want to know the command to add a user with no shell access so they cannot log onto the system, but there a user on there so for example they can be part of the email server.

View 2 Replies View Related

General :: Let User 'Y' Write In Folder 'A' Only When Executing Script 'X'?

Feb 17, 2010

How do I let user Y write in folder A only when executing script X?

View 3 Replies View Related

General :: User Write In A Subfolder When Can't Access Parent?

Jul 13, 2010

I was wondering, i have a webfolder and have permissions set to 770 with group being www-data. I would like to give access to one folder to a friend so he can edit images, css, etc. I made that folder 770 with group being site_name with www-data and him being in the group. So far so good it sounds like. However when i use the full path to the directory linux says it doesnt exist.

Is there a way i can make it so he doesnt have r/w file on files inside the parent directories and still access the directory i want to give him?

View 1 Replies View Related

General :: Write A Log File Of A User Interactive Process Using Tee ?

Sep 30, 2010

I want to write the sequence of operation of a user interactive process (Question asked by the process and answers user entered) in to a log file.

I used tee command, Precess1 | tee -a FileName

This write only the Question asked by the process. Does anybody know how to write the user inputs also to the same file, synchronized?

View 2 Replies View Related

General :: Send Message To Other User In Shell?

Jun 22, 2009

how can i send message to other user in shelli try use write before but it say permission deny from user

View 2 Replies View Related

General :: Unabel To Switch User Shell?

Mar 17, 2011

I have a big problem here.I have 2 shell windows, ne is a root shell and the other with some user account.If I change the root password in the root shell window aspasswd rootI can change it, but when I go into the user shell window, and I do "su" I cannot switch to root. Always "incorrect password".Same happen if I try to do "su <some-other-user>"This happen ONLY in shell windowws. If I try, for example, to run some administration service, like system-config-service, the root password is accepted in the prompting window.

View 6 Replies View Related

General :: Allow Specific User Permission To Read / Write Folder?

Feb 4, 2011

allow specific user permission to read/write my folder

I have a folder called /TAR/Sketch

I added a new user, named Snoopy, I want to grant this user the ability to add files & directories to this folder which is under the group Sketches and the owner is me.

How can I accomplish this ?

View 1 Replies View Related

General :: Always Create Files/folders But Only Write To Those The User Owns?

Aug 14, 2011

I need 2 Linux users to share a folder. Within this folder, users should always be able to create files and sub-folders and write into any sub-folder (whether they own it or not). However, they should only be able to edit the files they actually own.

View 1 Replies View Related

General :: Giving User Write Access To Directory And Subdirectories

Aug 10, 2010

I need to give a user write access to /var/www and its subdirectories. The current directory permissions are as follows:rwx r-x r-x root root

I added the user to the root group but that didn't seem to help.I read I could chmod -R to change the access to write for the www directory and subdirectories but I don't want to change things and mess up the website. How can I give the user access to write to the www directory and subdirectories without messing anything up? Would changing the www directory group owner to his group cause an issue anywhere?

View 3 Replies View Related

General :: Root User Using Freshclam Command Cannot Write To Directory?

Jun 27, 2010

When I log on a root and attempt to issue the command Freshclam to upgrade the virus definitions it attempts or create a new file with a definition name. I get a message stating that the directory isnt writable. The user and group access rights are as follows:

USER = read, write, execute
Group = read, write, execute
All= read, execute.

The only way I can get around this is by applying a 777 which would be read, write and execute for all. Now, I have a group define with several user ids in it including Root.How do I connect the group with the directory/file so I dont have to apply a 777 access right to group users could issue the Freshclam command.

View 1 Replies View Related

General :: Existence Of USER Environment Variable In The Shell?

Jan 28, 2010

I heard (although I can't find any sources for proof) that the USER environment variable may not be set in a old Unix shells (maybe even some obscure shells as well). What is the probability that it won't be set?

View 2 Replies View Related







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