Tag Info

New answers tagged


It depends on what you mean by obfuscating.  Here's an approach that lets you wrap scripts in compilable programs, allowing you to turn them into binary executables.  Write a C program that looks like this: #include <stdio.h> #include <stdlib.h> ︙ FILE *sh; sh = popen("/bin/sh", "w"); // Use "/bin/bash" if ...


As most Linux experts believe so, creating a root account ain't a good idea and that's why people mostly stick to SUDO (Although, sometimes it might make you kind of nervous.) But if you can accept risks, this piece of code would activate a root account: sudo passwd root I'd suggest you deactivate it after you satisfy your need with it. You may want to ...


The UID and the GID of root are 0. So you have to run those commands: groupadd --gid 0 root useradd --home /root --uid 0 --gid 0 root You can name this account likeyou want, what's important here is the UID (user id).


The root account is always there, you just need to set a password for it: sudo passwd root And enter a password when prompted to.


According to the man page for etckeeper, your first situation is documented, commit [message] Commits all changes in /etc to the repository. A commit message can be specified. You may also use the underlying VCS to commit manually. (Note that etckeeper commit will notice if a user has used sudo or su to become root, and record the original ...


This line in the sudoers file works for me to allow a user to run useradd someuser ALL=/usr/sbin/useradd * -m The * is a wildcard, there are other wildcard symbols, read man sudoers


Just add the options to the command: admin ALL = NOPASSWD: /usr/bin/netstat -i admin ALL = NOPASSWD: /usr/bin/netstat -r Then admin will be able to run sudo netstat -i, but not sudo netstat etc.


Edit the sudores file with visudo and add one line (or as many as you need) like in my example admin ALL=/bin/netstat -r admin ALL=/bin/netstat -i ALL= can be a hostname, IP or localhost The sudoers file is very well commented, at least in my CentOS


Create a script #!/bin/sh netstat -i call it supernetstat.sh (don't forget permission 755,better 700) then you can create an alias command on sudo and give permission to user


You're using a remote filesystem. If the server doesn't want you to delete a file, you won't be able to delete the file. The local root user is not necessarily all-powerful on the remote machine. There is presumably an access control list on the Windows machine that causes the file to be read-only or non-deletable through remote accesses.


Probably is in use by a process, solution can be easy: umount the share, check for process using file(use fuser,lsof) and if no process is using remove it


Linux is not Windows and root can not currently be renamed easily without creating unknown future problems. Disabling remote and even local login as root is a safer approach because it actively disables the account root! UBUNTU essentially does this and forces sudo instead of root access. Essentially no one can use the root account to attack your system ...


Now you cannot run google-chrome as root user on updated versions, To run Google Chrome as standard user (while Logged in as Root) open terminal and type: adduser -u chromeuser OR useradd -m chromeuser To run google chrome use command: gksu -u chromeuser google-chrome OR sux chromeuser google-chrome If you don't want to run it from Terminal then add ...


Boot from the installation media and then mount the disk and edit /etc/passwd, /etc/shadow if needed. If you don't have the media, try to connect the disk to another system which can mount an old sysv-ufs in rw mode.

Top 50 recent answers are included