Hi everyone,
The need which made me come here and share the problem with you is that the proper usage of late_command in preseed file.
I've prepare a preseed file which works fine, but the late_command should install a test script when installation finishes.
I'm sorry if I missed an answer here. But I did Google this and couldn't find a straight forward answer.
I want to enable the apache user to run commands as another user, but when I do:
echo "PASSWORD" | sudo -u another_user -S echo "X"
Inside a PHP script, I get:
[sudo] password for apache:
The apache user doesn't have a password, so I can't just output it in order to run sudo.
For server monitoring, we execute couple of commands with password-less sudo every minute. This fills the server logs.
sudo: zabbix : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/foo/bar
Can I prevent these entries?
I have a script run from a non-privaleged users' crontab that invokes some commands using sudo. Except it doesn't. The script runs fine but the sudo'ed commands silently fail.
The script runs perfectly from a shell as the user in question.
Sudo does not require a password. The user in question has (root) NOPASSWD: ALL access granted in /etc/sudoers.
Cron is running and executing the script.
I was hoping to edit the command below to copy a file "start.bin" from the install cd to /root on the installation machine.
I need to build the following command in linux using ProcessBuilder:
sudo packit -t UDP -S 1000 -D 1200 -s 127.0.0.1 -d 192.168.1.1 -c 5 -n 12345 -p '0x 80 64 45 78 00 00 27'
I tried with the following code:
commands.add("sudo"); commands.add("packit");
commands.add("-t"); commands.add("UDP");
commands.add("-S"); commands.add("1000");
commands.add("-D"); commands.add("1200");
commands.add("-s"
I think that sudo is become a wide used command with Ubuntu, where you don’t even have a root password, before that probably it was used only in some data-centers to restrict access to some commands.
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.
The average linux users use the terminal commands for many tasks and some certain commands are very frequently used. For example, if you are a user of Ubuntu, you have to type " sudo apt-get install" every time you want to install a new package or the command "xset dpms force off" to turn off the desktop/laptop monitor.
Published at LXer:
There comes a time in every Linux users life when you will open the Terminal more often than not because you have realized that it is faster, more efficient and more powerful than GUI (Graphical User Interface). Youll have started to learn more and more commands and now feel more comfortable with command prompt.