Ubuntu - sudo with ACL [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I am sorry if this is something obvious but I am new to Linux.
I was trying to set a git bare directory and for this I installed ACL on Ubuntu. Then I ran the following commands:
adduser git
mkdir /repositories
chmod 700 /repositories
setfacl -m defaut:user::rwx /repositories
sudo chown git:git /repositories
Everything was fine until I rebooted the machine. Now I am unable to execute sudo anymore. Everytime I do it as myself I get following message:
[[sudo]] password for Andre:
Sorry, try again
The password I enter is the same I always used, and I don't have any problem to SSH with these account credentials.
Does anyone knows what happened and how to fix it?

I think that the issue was with setfacl. I should have used 'repositories' instead of '/repositories'. In that way I set acl across the root. I ended up reinstalling Linux.

Related

Undo chown and chmod [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I'm new to Ubuntu.
I ran the following commands to save files in htdocs folder (to conveniently use XAMPP for programming) without understanding its security consequences:
sudo chown username:groupname /opt/lampp/htdocs
sudo chmod 700 /opt/lampp/htdocs
I would like to undo the file permissions (on the htdocs folder) to what it was before I ran the above commands.
Any help is much appreciated, thanks.
I think there is no way undo chown and chmod. But you can see default permission of these folder in any other machine which has fresh installation or you can install lampp again in different folder. Then change chown and chmod permissions of /opt/lampp/htdocs to default.
For the second one run this command
sudo chmod 777 /opt/lampp/htdocs
I solved the same problem by using this

Default user ubuntu ec2 deleted Accidently [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have accidently deleted the folder of defaut user ubuntu in my ec2 server , son whene i want to reconnecte to ssh , it gives me Permission denied (publickey).
Please my friends , really i'm blocked i have my data in this server and i can't find any way to access , please help me to solve this.
Stop the VM
In the EC2 console, under 'Actions' select 'View/Change User Data'
Enter the following, replacing the <username> with the desired username, and <publickey> with your public key from your computer
#!/bin/bash
useradd -ms /bin/bash <username>
mkdir /home/<username>/.ssh
echo '<publickey>' >> /home/<username>/.ssh/authorized_keys
chown -R <username>:<username> /home/<username>/.ssh
chown -R 600 /home/<username>/.ssh
Save and start VM

Adding myself back to the sudoers file in Ubuntu 12.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I recently changed the permissions around for the /var/www/ directory on my Ubuntu 12.04 machine. Now my user can save to the directory but I get an error whenever I try to run the sudo command stating that my user is not in the sudoers file. I booted up grub to take a look and have tried to run "sudo usermod -G sudo kevin" a few times and get the error cannot lock /etc/passwd/; try again later. Is there any way to re add myself to that group without re-installing Ubuntu?
It sounds like your problem stems from the file system being mounted read-only as it is by default in recovery mode. Try remounting the filesystem in read-write mode using
"mount -o remount,rw /"
Are you sure your system is mounted in read/write mode when you're using GRUB? This can be achieved through the mount -o remount,rw / command.

Whats does adding user to sudoer file do? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am trying to run a command that needs to write to the / folder. I added myself as user to sudoers file using sudo visudo. Added the following line at the end of file.
yedg ALL=(ALL) NOPASSWD: ALL
The command still fails complaining about permissions. Now this makes me wonder does adding to sudoers file allow me to run as root or does it give me privileges similar to root? Looks like the former. Am I right or did I miss something?
After you are added to sudoers file, you have permission to execute commands as root through sudo command.
Something like this:
sudo apt-get install skype
sudo rm -rf protectedDirectory
Actually sudo means substitute user do.

mysqld won't start, /etc/default/rcS missing in Angstrom [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
When I attempt to start mysqld, it gives me the following error:
./mysqld: line 3: /etc/default/rcS: No such file or directory
I want to run a mysql server on angstrom linux.
Anyone know how to do this?
I got it to work by commenting out the following line from my /etc/init.d/mysqld file:
. /etc/default/rcS
This is a quick fix I'm guessing, I am not sure what that file does so I don't know the implications of this action, but the mysql server is now working ok!
Your system is missing the file. Apparently it's part of the 'initscripts' package. You can attempt installing it with "sudo apt-get install initscripts". If it's been a while since updates: "sudo apt-get update && sudo apt-get upgrade", but maybe just the update will work. If none of that works, find one online that's suitable for your system and create it manually.

Resources