New answers tagged

0

/ = Root Directory. Every single file and directory starts from the root directory. Please note this is Root Directory, not root user's home directory is root user’s home directory /root = Root User's Home Directory /home = Home Directories except root user's which is /root. ~ = Current User's Home Directory In other situations, for instance if you see /...


3

The POSIX standard says A pathname consisting of a single / shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. It makes a distinction between filenames and pathnames. What / is is a pathname for the path of the root directory. Then name of the directory is "the root directory", but in the ...


2

The use of the word "name" is a little bit flexible; it can refer to a "fully qualified path name"; it could refer to the "directory entry"; it could refer to the "file name" passed to various functions or routines. So, for example, /etc/foo and /var/tmp/../../etc/foo and /tmp/../../../../../../foo are all ways of referring to the same file; they're all ...


2

slash is a separator; directory names do not include separators, but full pathnames include the separators. So the "root-level" "/" has no name. On most Unix-like systems, this is treated as a special case like "." and ".." (though of course there is no difference between the two at the root level). Nomenclature can differ. POSIX, for example lists some ...


0

Ok, So in my case, The only way to force the counters to reset would be to reboot the server. Not ideal, but this is the case. As mentioned by ilkkachu, probably the best way to do this would be to save the value at the beginning of the new month and then calculate from that point forward. However, I couldn't wrap my head around an elegant way to accomplish ...


0

I could get this to work on my box, but I'm not sure if sudoers option requiretty would break it. On machine B create program that sudo will use to ask for passwords. e.g. /home/myname/askpass.sh, chmod it +x #!/bin/bash echo "my_password" On machine A create connect script that will establish the ssh connection for the scp and inject sudo + related ...


5

Wow okay well have you considered just removing the user? userdel john As others have mentioned login as root over ssh is ill advised and so is having duplicate uid's of 0.


0

From what I know it's sudo -i OR su


4

The command is sudo. Add a line such as below into /etc/sudoers sigis ALL=(ALL) NOPASSWD: ALL This means user sigis can now run things like the command below without requiring password. sudo shutdown -h now


2

The usual way would be to save the value at the change of month, and calculate differences against that value. That way you could easily, say count values over more than a single interval, and also make it possible to use a single data source with multiple independent consumers, without them stepping on each other's numbers. Besides, zeroing the counter ...


2

The file manipulation operations you are performing might not be working, because files in /proc are not really true files in the common sense, but virtual files that provide a 'window'/interface to variables in the linux kernel. The only way to reset the interface counters is by unloading and loading again the corresponding interface kernel module. To ...


2

When you build an RPM you are effectively running "untrusted code". The problem is that a badly written application might try to write content into system directories (e.g. /bin or /usr/bin) during the compile/build process. This could just be due to buggy code or a mistake in the options passed. If you are running as a non-root user then this will fail ...


2

As root edit /etc/sudoers and place the following line: youruser ALL=(ALL) NOPASSWD:ALL after # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL In this way you will be capable to execute all commands that require sudo privileges passwordless. In order to use sudo and be prompted for a password you need to remove ...


0

According to this link, you need to use sudo chromeos-setdevpasswd.


1

Yes, doing it as the root user would allow you to change the permissions on (and owner of) these files and directories. $ cd /backup/dir/somewhere $ sudo chown myname:mygroup myfile $ sudo chmod u+rw myfile ... where myname and mygroup is your username and default group (check you other files in your home directory or use id -n -u (for username) and id -n ...


0

You need to become root (using su or sudo) as only the owner of a file can change its permissions.



Top 50 recent answers are included