General :: Run Command As Root On Startup?
May 14, 2011
As I tried to explain on the title, what i need is to run this command "NetworkManager --no-daemon" as root every time I start my arch+gnome so that the nm-applet would show on the panel.I need to know a way to do this automaticaly each time I start my pc
View 6 Replies
ADVERTISEMENT
Sep 21, 2010
I was going through a server hardening manual.t some interval it was mentioned that there should not be any alias for commands defined in roots startup files .
View 1 Replies
View Related
Apr 14, 2010
Is there a way I can run 'completely' one of my script when ubuntu's desktop appears no matter if root , administrator, desktop user or an unprivileged user logged in?
What does the script do? The script mounts a partition, looks for a file in that partition and finally on the basis of that file a decision of copying a partition to another partition is made. That copying is done via
[Code]...
View 5 Replies
View Related
Aug 4, 2010
I am running Linux Mint 9..I play xbox live and run it through my laptops wireless network connection so i dont have to pay 100 dollars for the usb wireless adapter for the xbox. In windows 7 this is easy to configure so that when i turn my laptop on and then xbox it automatically connects.
View 10 Replies
View Related
Sep 19, 2011
Every time I need to start or stop Tomcat, I am navigating to:
/Tomcat_Dir/bin
and once I am in the folder I enter:
./Startup.sh
And to stop the server, I navigate to the same directory and enter:
./Shutdown.sh
I was wondering if there was a way in Linux to alias the above described process, so that from any location in the filesystem, I can simply type in something like
StartTomcat or StopTomcat to perform the Startup and Shutdown of the web-server?
View 2 Replies
View Related
May 13, 2011
I was wondering how to run a bash command automatically on startup. on start-up have "alsamixer" or "start-network" executed from terminal.
View 3 Replies
View Related
Jun 2, 2011
I have installed a new Linux distro (just to test it) on my usb memory stick, and I'm trying to run it. I don't know if what I did is correct so far, anyways here's what I have:
Grub on sda (internal hard disk)
sdb with no boot loader (memory stick)
In grub I've been doing:
root (hd1,0)
kernel /kernel-genkernel-x86_64-2.6.37-sabayon root=/dev/sdb1 vga=normal
initrd /initramfs-genkernel-x86_64-2.6.37-sabayon
boot
This seems to work (as opposed to when I forgot the root= parameter, which almost destroyed my linux on sda1 ), but during startup the system complains about no root bein found on /dev/sdb1. I also tried (hd1,0), but it didn't change much.
I'm sure I can boot an OS from usb on my computer, so doesn anyone know what I'm doing wrong?
View 4 Replies
View Related
Jan 23, 2011
I want to run this command on startup.
xmodmap /etc/xmodmap
I am running Ubuntu 10.10 and need to remap keys. It only seems to work when I run it in terminal after I login.
View 2 Replies
View Related
Jan 8, 2010
So, i've a little question. I have a Linux Red Hat 5.1 System wich has a programm that needs to be started as a user -> usera .When i reboot the server, how can i make it possible to run a command in the shell as usera user?Someone told me, that this is not possible to make an autostart entry because this works only with the root account?!What i want its simple.- Command -> startprg need's to be started as user usera automatically after an automated reboot of the red hat linux
View 4 Replies
View Related
Jul 6, 2010
Is there a way to configure the at command to send to someone other than root?
View 1 Replies
View Related
Jan 24, 2010
On my ubuntu I have a command pm-suspend, which puts the computer to sleep. It has to be run with sudo. Since it is inconvenient to be forced to type the password every time I want my computer to sleep, I thought maybe there's a way around it. Naively I thought that if I'd create a script as root, that invokes pm-suspend, and then let anyone execute that script, I could run that script as my own user and then that script would be considered run by root and hence be allowed to run pm-suspend. Obviously that didn't work. The root-check procedure in pm-suspend still found out that the original executor was someone different from root.
Still I think something similar (although slightly more elaborate) should work.I'm thinking about the process that allows the user to mount hard drives for example. Normally root is required, but it is somehow bypassed by the gnome utility mounting.
View 8 Replies
View Related
Apr 3, 2011
I have a Linux machine which I set up for my personal use at home. I installed Fedora Core 11 a long time ago, and recently I noticed that I am not able to log in as root (I didn't realize this issue until recently since I always have been logging in as a user account that I created during the FC11 installation).When I login as a user account instead of root, I can use the su command with the password I set up for the root account. Even when I'm in GUI mode and try to make changes to the system from the user account, the GUI asks to enter the root password, and I type the password I set for root and it works. However, if I boot the machine and try to log in the system as root, password that I set up is rejected.
I'm very puzzled with this problem because with my limited knowledge on Linux system, I thought the root password and the su password are the same (i.e. when you install Linux OS, you set the root password, and you use the same password for using the su command). I do not know exactly when this problem started, but the only thing that I can think of as a cause of this issue is that I once changed the root password from GUI using System > Administration > Root password since the system one time complained about the low security strength of the root password.
View 6 Replies
View Related
Feb 8, 2011
I am having redhat 5 linux machine running on my windwos x in vmware workstation. Today i was installing oracle software in redhat 5 after editing the bash profile for the oracle user i got the following messages
su - oracle
password:*****
-bash: [oracle: command not found
[code]....
View 10 Replies
View Related
Oct 24, 2010
I am using fedora 13. If is use the command "cd //". It changes to root directory. How is it? What "//" denote?
View 6 Replies
View Related
Sep 4, 2009
I am running a shell script using a non root user. Somewhere down in the script, I'll have to call some script to be executed as su (or a user with more privileges than the one running the original script). So if i put a line in the script as:
Code:
su - root -c /root/roleScripts/assignRoles.sh
Then when running the command, it will prompt me for root password(because the current user has lower privileges than the user requested. Suppose I want to pass this password as an argument to the original script, so that it doesn't prompt me for password later on, what is the way? Can I switch user passing the password and run a command?
View 14 Replies
View Related
Sep 15, 2010
I use the system command route from a process (using the system() call). For security reasons the process does not have root privilege and for some reason I cannot use ioctl() either. I tried to set the capabilities of the process to NET_ADMIN and SYS_ADMIN but the route command still failed due to insufficient permissions.
What are the capabilities that I need to set for route to be successful?
View 1 Replies
View Related
Jun 24, 2011
I am learning Linux administration and I am new in this area. Currently I am trying to find out which drive has grub.conf file. Following commands giving me correct output (hd0,0):
find /grub/stage1
find (hd0,0)/grub/grub.conf
But root command gives me output (fd0). Why?
View 3 Replies
View Related
Jul 1, 2010
I want to delete all may mail root in command line and i don't find this... the command mail + "d" work fine but i want use it in a .sh
I explain too : I use fetchmail to have mail from a gmail box, and use RIPMIME to save the attachment in a folder... these work fine, but the i want delete these mails.
View 3 Replies
View Related
Nov 13, 2010
i recently installed Fedora 14 and when i'm trying to open any file i'm getting this error
[root@blitz Documents]# gedit /home/blitz/Desktop/test
**
GLib-GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection-
[code]....
View 2 Replies
View Related
Oct 17, 2010
How can I move a directory to the root of a drive via command line?
In MS-DOS it would be 'move C:/GAMES/QUAKE C:/'
What is the equivilent in Linux?
View 8 Replies
View Related
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
Sep 9, 2010
In Ubuntu 10.04, I logged in as user1 and when I open a new terminal and issue any command it is asking password.user@ubun-laptop:~$ sudo ifconfig[sudo] password for user: It is asking for password only for first time.From the next command onwards it is not asking.Can some one please tell me if it is possible to issue ONLY ONE COMMAND, in which even if the password request comes, it will automatically fill the password.Just like "ps -elf | grep NetworkManager". I am expecting any combination of commands in a single line, so that password is filled automatically IF PASSWORD IS ASKED. If password is not asked, the command must be executed.
View 17 Replies
View Related
Aug 10, 2011
Is there a non-root shell command that can tell me if a user's account is disabled or not? note that there is a fine distinction between LOCKING and DISABLED:
LOCKING is where you prepend ! or * or !! to the password field of the /etc/passwd file. On Linux systems that shadow the passwords, this marker flag may be placed in /etc/shadow instead of /etc/passwd. Password locking can be done (at a shell prompt) via password -l username (as root) to lock the account of username, and the use of the option -u will unlock it.
DISABLING an account is done by setting the expiration time of the user account to some point in the past. This can be done with chage -E 0 username, which sets the expiration date to 0 days after the Unix epoch. Setting it to -1 will disable the use of the expiration date.
The effect of locking to to prevent the login process from using a supplied password to hash correctly against the saved hash (by virtue of the fact that the pre-pended marker character(s) are not valid output character(s) for the hash, thus no possible input can ever be used to generate a hash that would match it). The effect of disabling is to prevent any process from using an account because the expiration date of the account has already passed.For my situation, the use of locking is not sufficient because a user might still be able to login, e.g. using ssh authentication tokens, and processes under that user can still spawn other processes. Thus, we have accounts that are enabled or disabled, not just locked. We already know how to disable and enable the account - it requires root access and the use of chage, as shown above.To repeat my question: is there a shell command which can be run without root privileges which can output the status of this account expiration info for a given user? this is intended for use on a Red Hat Enterprise 5.4 system.The output is being returned to a java process which can then parse the output as needed, or make use of the return code.
View 2 Replies
View Related
Sep 5, 2010
I need to run a few simple commands at the startup of my computer. (need to run as root if possible without needing to enter login's infos)
Basicly, the commands are about the same line, so i'll just post one: screen -S Name1 -L -d -m php -f /root/mainloop.php config.php
View 3 Replies
View Related
Jan 14, 2010
Recently installed some minor software, some games and Ubuntu Tweak, I am not sure if that's what caused this issue or not. I shutdown after the installations, then when I tried to start back up the small, white ubuntu logo appears just like it normally does, then it just goes to a black screen. I turned off the computer and restarted in (Recovery Mode). It goes about its thing then it says it is waiting for root file system, then after about 30 seconds it says "Gave up waiting for Root File System" how to fix this without reinstalling?
View 2 Replies
View Related
Jul 29, 2010
I am trying to run my script at startup but it doesn't run the script as root. Do I need to add my root username and password in the script, or somewhere else?
View 1 Replies
View Related
Apr 25, 2011
I'm trying to enable a few of the powertop suggestions at boot. My plan had been to put the changes in /etc/rc.local, but it appears possible that some of the changes are happening too early in the boot process to take effect. Specifically
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings and cd /sys/devices; find . -name link_power_management_policy -print0|xargs --null -n 1 -I{} -t bash -c "echo "min_power" > "{}""
both work if run with sudo permissions after I've logged in. where to put these such that they'll take effect on boot? Or can I put a sleep in the rc.local?
View 4 Replies
View Related
Apr 29, 2009
There is a script that I want to run as root when the machine boots up(which starts the Redhat Certificate System services). The problem I have is if I put this on rc.local it wont run because I havent logged in as root. Is there a way that I can run this without logging in as root at the machine startup?
View 5 Replies
View Related
May 4, 2009
Can anyone tell me how to make this script,( located in /etc/init.d/tomcat ) startup at boot time under the tomcat user and not the root user?
#!/bin/bash
# tomcatStartup Script for Tomcat
# chkconfig: 2345 20 80
# description: Tomcat Server basic start/shutdown script
# processname: tomcat
# pidfile: /var/run/tomcat.pid
[Code]...
View 5 Replies
View Related
Sep 15, 2010
i have a file, 2fsrl, that i want to run at startup. If i type /home/kent/2fsrl in the terminal it works. Although it won't work if i put the command in Startup Applications.
In my file is this:
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient EmulateTwoFingerMinW=5
synclient EmulateTwoFingerMinZ=48
It's for 2 finger scrolling
View 3 Replies
View Related