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
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 .
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
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.
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?
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?
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.
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
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.
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.
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
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?
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?
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):
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.
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.
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.
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.
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?
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?
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
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?
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?
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