Hot answers tagged

16

Traditional unix permissions only allow user, group, other permissions as you've found. These can result in some awkward combination of groups needing to be created... So a new form of ACL (Access Control Lists) were tacked on. This allows you to specify multiple users and multiple groups with different permissions. These are set with the setfacl command ...


5

No, vim is not set user id (that is, it will not change effective userid). running a command line from vim will give you a shell (that is the word) as user2. By the way, to edit the file you must either be user user3 belong to group user2, merely being user2 is not enough. There used to be a bug in redhat 4.x (or still is) when running visudo, which ...


3

Recent versions of Mac OS X have what's known as System Integrity Protection, aka "SIP", aka "Rootless". It basically makes parts of the file system read-only to everybody, including root. You may have bumped into that. https://en.wikipedia.org/wiki/System_Integrity_Protection The intent is to prevent mistakes and malware from modifying your base ...


3

Yes Yes Yes It depends, complex program (database, tomcat like web server) do, smaller (gif generator) don't. It depends, if no set user id, program will run as clicking user. root mostly, some as www (if you have a web server), some as bin, mail.


3

It looks like that's actually the username. Try checking the passwd file, and you might find that somebody tried to comment out a line: grep owner /etc/passwd If you find that there is a line starting with #, then if there is another line which doesn't have it, you may want to remove the line with the #. Otherwise, you may just want to remove the #. That ...


3

If we look at the source for (a version of) i3lock, we can see it determines the user whose password is required by doing getuid(). So setting the environment variable USER has no effect, and you will need to su or sudo as that user instead.


3

The www-data user is evidently configured with /sbin/nologin (or equivalent) as its shell, and thus the system will not allow you to login to that account. sudo lets you run a command as any user on the system, not just root. To clone the repo, you just need to sudo -u www-data git clone ... If you really need shell access as that user, sudo -u www-data ...


2

The best and easiest thing you can do is to add groups to each of your users, i.e. modifying your users! This task can be done by using usermod command. Read more here. Be aware that -g option is for user's new initial group (i.e. Primary) while -G option is a list of supplementary groups which the user can be also a member of. You can get more information ...


2

By saying you're in user2's shell you imply you've been logged in as user2, the command whoami or echo $LOGNAME will let you know the same. Whatever commands you are firing in the terminal are considered to be fired by the logged-in user, except for those through sudo. The coloumn names in an output of ls is as below, for you reference. The Fourth field is ...


2

Yes, ACL:s allow freely setting different rights to different users or groups. IIRC the usual group permissions limit the set of permissions that groups and users can have through ACL:s (shown as mask in getfacl), but setfacl should deal with that if you add permissions. But in some cases you need to ask if the set of permissions makes any sense. I have ...


1

There is no $HOME defined in /etc/rc.local so when syncthing resolves its configuration location $HOME/.config/syncthing it's finding /.config/syncthing. I suspect that this contains details for your local user, thom, whereas when $HOME=root, /root/.config/syncthing contains details for root. Also, you don't need sudo when you're already root (as in /etc/rc....


1

First, try changing AllowUser userName in the /etc/sshd_config file on your WD My Book to AllowUsers root admin userName to see if that resolves the issue. Also, check the contents of /etc/passwd and make sure that the entry for userName doesn't include /user/sbin/nologin, but instead something like /bin/bash. For instance, the entry for the admin account ...


1

You can use usermod or edit the group file directly # usermod -a G ${group} ${user} # vi /etc/group ... wheel:x:10:root,user1,user2 ... Just remember group changes do not always propagate to active sessions. If you are changing your own user logout and then log back in.



Only top voted, non community-wiki answers of a minimum length are eligible