New answers tagged

0

By default the umask for users creates files with 644 permissions or rw-r--r-- which allows all users to read but only the own to write, default permissions for directory creation is 755 which is rwxr-xr-x for a directory the execute bit (x) is interpreted differently and represents permission to list the contents of said directory. Thus you could do what ...


0

Because you are trying to list the UID and Username, the below command works better best on Solaris. They have two awk awk -F: '($3 >=1000) {printf "%s:%s",$1,$3}' /etc/passwd


0

I would try using rsync to stay on the sage side: rsync -rlvzu --owner=<new-username> --chmod=a+rwx,g+rwx,o-wx /source/ /destination/ where -r for recursive -l for links -v for verbose -z for compression -u: updates the files instead of overwriting them (saving time) --chmod=a+rwx,g+rwx,o-wx: updates the permissions


2

After you created your user, before you log out of your old user make sure he is in the right groups: sudo adduser --home /home/<new-username> <new-username> sudo usermod -aG adm,cdrom,sudo,dip,plugdev,lpadmin,sambashare <new-username> Then : mv -v ~/* /home/<new-username>/ chown -R <new-username>:<new-username> ...


22

After some experimentation, I found the answer. To set options such as mail_always or root_pw for specific users, you can add a line like this to your sudoers file after opening with visudo: Defaults:USER_NAME mail_always Just make sure that this line is inserted near the top, where the other Defaults options are. In addition, if you want to specify the ...


0

you should not need to explicitly start sh (when the script includes a hashbang), Which will not reuse the currently set environment variables. So try ./wso2server.sh or sudo ./wso2server.sh


4

All of these answers are excessively bloated. Three characters for a command? Please. The fastest way to find who's logged on and doing what is: $ w


1

Using "who" will tell you who's logged in. You can also use "ps au" and it will show who's logged in and what they are running.


4

The easiest method to find who is logged on to your system is the use the who command, a part of the gnu coreutils package. It can be used as an ordinary user with no options or with my own favored option which enhances readability: andrew@ilium~$ who -H NAME LINE TIME COMMENT andrew tty1 2016-05-06 07:34 andrew@ilium~$ ...


2

You can use the command users to see who is currently logged in. Take care.


1

To add users via the gui : go to the System Settings (the cog icon) -> User Accounts If you want to add users via the cli: sudo adduser USERNAME --ingroup phablet If you still have problems: check the permissions of the password file: ls -l /etc/passwd they should be -rw-r--r-- and belong to root:root you can fix this with chmod to change ...



Top 50 recent answers are included