Tag Info

New answers tagged

0

I needed to provide access to user sam on /var/xyz only and block listing contents of other folders inside /var/ I used the following sequence of commands: setfacl -R -m user:sam:--- /var/ setfacl -m user:sam:rx /var/ setfacl -R -m user:sam:rwx /var/xyz/ So the user can see directories listed under /var/ but cannot see contents under sub directories ...


0

You might try changing the permissions of that program. I don't know if you can prevent a user from seeing the file, but you can definitely remove their permission to execute it. You can remove everyone but the owners right to read, write, and execute the program. # removing read, write, execute privileges of "group" and "other" from the program file. sudo ...


2

Your question is a bit vague because you haven't really said what you need this for. I'm assuming you need arguments as well so first create the script, so in the terminal type nano scriptname.sh and past in the script below. #!/bin/bash #$1 username #$2 home directory useradd $1 -U -m -d $2 If you type 'man useradd' you will see that -U creates a ...


2

create a file and put smth like #!/bin/bash useradd "$1" && gpasswd -a "$1" group in there.


2

You can prepend sudo to all the commands. Make sure to run the script as root, the unprivileged user will be put in as needed #/bin/bash do-something-neat # Run as invoking user (root) sudo -u randomuser do-something-else # Run as "randomuser" user make potato --type=Mashed # Run as invoking user (root) ...


1

Are you sure that www-data needs to do chroot? Please explain why. There is no way to get /bin/chown to restrict UIDs. You will have to write a wrapper around /bin/chown that does the input validation, then calls the real /bin/chroot, then allow www-data access only to the wrapper.


4

Some examples of reasons where someone would need to edit the User ID: User IDs (UID) can have special meanings on a system. And not every Linux system uses the same groups of UIDs. Some Linux distributions begin UIDs for non-privileged users at 100. Others, such as Red Hat, begin them at 500, and still others, such Debian, start them at 1000. Because of ...


0

How to configure a quota for the root partition affecting a single user: Open a terminal. CtrlAltT. Run it: sudo -i nano /etc/fstab In the open file, you must add to the assembly line of partition, root in this case, the parameters usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0. Example: Change # / was on /dev/sda1 during installation ...


2

Edit /etc/login.defs using a text editor: vi /etc/login.defs Edit these 3 parameters to what you want (example from the file and the defaults given): # # Password aging controls: # # PASS_MAX_DAYS Maximum number of days a password may be used. # PASS_MIN_DAYS Minimum number of days allowed between password changes. # PASS_WARN_AGE Number of ...


0

You can login as root and change the password for the default user (other than guest) to whatever you want it to be, then proceed as normal. You can alternatively login as root and do as LDC3 suggested, add a new user with the adduser command. You won't be able to do his recommending in a default installation because root won't have a password... and also ...


0

When I installed Ubuntu, it asked for a user and password before it copied any files to the drive. You can add users with adduser sudo adduser UserID It will ask for the SU password if you had assigned one.


0

Warning: Take your time reading this first sentence: Before typing the following keystroke, remember that Ctrl+Alt+F7 is your friend. This is the keystroke to type to get back to where you are right now. (probably your guest session) OK? Remember? Sure? OK! Now press Ctrl+Alt+F1 to go to TTY1, which is a full screen terminal (and only a terminal: no ...


0

Use the command : sudo lsof -i -n -P This command lists the Application Name, PID, User, IP version, Device ID and the Node with Port Name. It shows both TCP and UDP. Variations : To format it in a nice, readable way; use : sudo lsof -i -n -P | more To view view only TCP connections : sudo lsof -i -n -P | grep TCP | more To view view only UDP ...


0

For a complete beginner one of the best places to learn is built-in Ubuntu manual. Go to System Settings - on the top left menu bar go to Help. You had better browse all topics listed there.


2

Welcome to Ask Ubuntu. This is a Ubuntu community dedicated exclusively to answer Ubuntu-specific questions. I suggest you to visit this link and read on. Keep experimenting a lot and don't hesitate to ask here for any assistance on using Ubuntu. Make sure you search before asking a new question. There's a very good probability that the question might ...


1

I have the exact same problem. Installed Compiz Settings Manager and Unity Tweak Tool because Unity was not responding properly. Consequence: Nothing shows, no dash, no bar, nothing... just a wallpaper and the mouse. I tried following this same post: Difference between Login in Ubuntu 14.04 tty1 and Initial Login I can't log in to tty1. It says my login ...


1

Look at /etc/defaults/useradd if you want to change the defaults. Use: useradd -m -d /home/joe -s /bin/bash.


2

In most situations (read default installations), root can do anything a regular user can and much more. If you think root cannot do something, remember it can become a user who can :) You'll be fine.


2

At the terminal, you can create a new group using sudo groupadd GroupName and then you can add a user using sudo useradd -G GroupName UserName


0

You usually need to enter your password (or sudo to root) in order to install things, and xampp won't be any different. It's completely normal to do that. Root privileges are needed to install services that start at boot, etc. It doesn't necessarily mean the programs / services will run as root unless they've been designed to do so. I don't think you've put ...


0

I would recommend using w to identify the idle tty, then send it SIGHUP: pkill -SIGHUP -t pts/5 SIGHUP (the hangup signal) will terminate the session more gracefully, almost as if the user had issued the logout command herself. SIGKILL should always be a last resort.


1

I needed something similar - a new user without login privileges and tied to a system service. However, the answer by Clausi creates a user with the primary group as 'nogroup', which wasn't really desirable. adduser --system --no-create-home --group USERNAME creates a system group with the same name as the user and associates it with the user as the ...



Top 50 recent answers are included